473,765 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Launching and controlling a new application instance via COM

5 New Member
I am having a problem where I have a COM application that can be run stand-alone and programatically via COM interop. If an instance of the COM application is being run when my .NET application that does the COM interop starts, it latches onto a currently running instance rather than making a new instance for itself.


So here are the facts of my situation.


  • I have a Delphi 7 app that implements a COM Server.

  • I have imported a reference to this application in a VS 2008 project by adding a reference to the COM server.

  • It works great if there are no previous running instances of the application prior to executing my .NET application.

  • If there is 1 or more instances of the application executing, when the constructor for implementing the COM Interop class is executed it just latches on or hooks into one of the already running instance of the application.

  • Instead of the above happening I would like to create a new instance of the application and hook onto that one.

I think that the above points make my very special situation really clear now. If still not yet clear a co-worker of mine has posted a on the stackoverflow forum with the same question worded in his own way. (Link to post)

Any help would be appreciated.

I am new to COM Interop, but wouldn't this be the same as doing automation in Word or Excel? This issue would most likely come up a lot I would think.
Feb 4 '09 #1
0 1326

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1389
by: Trevor Perks | last post by:
I wondered if there was any way to launch a Windows Application from C# and then control the mouse and text inputs from C# instead of user input?
4
477
by: Danny | last post by:
Hello again I have two quesitons about launching IE from code in access. Is there a way to do the shell command to launch IE without having to know the exact path. shell seems to be picky and will not work without the exact path. Is there a way to keep one instance of the IE open when you use this command? Instead of it having to open each time you run the shell command?
4
3281
by: m11533 | last post by:
I am writing a fairly complex application in c# and Visual Studio .Net 2003. Right now I am working on a simple console application (to be launched in the future from a service) that receives messages sent via IP from an external device. I am also writing a simulator of that external device. My question: How do I setup the Visual Studio so that when I start debugging my c# application, both my message sink AND simulator are launched? I...
6
1557
by: sebastien | last post by:
Hi I have an asp.net application that use Session variables. What I want to do is to launch an second instance of this application by a link inside the first application. The problem is: when I launch the second application, this second application override the session variables values of the first application. I can run 2 instances of my asp.net application if I open two browsers and I enter the url of my web application in the address...
1
3437
by: Ryan Malone | last post by:
I have a situation where I need to download multiple files in a vb.net application. To speed up the process, I am trying to download multiple files at one time looping through each of the files and launching them in their own thread (code below). The problem is that when there are hundreds of files to download, it launches them all at the same time and half don't get downloaded. Any idea how I could control it to launch say 4 at a time,...
8
2185
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got answered... In 1.1 we always did our own myDataAdapter.fills and we liked that control for lots of good reasons. Now the new DataSource (or is it a TableAdapter:Dataset) automatically fills the Gridview. How can we control that fill? In a...
1
2039
by: John A. Bailo | last post by:
Excuse the novice aspects of this question, but: What techniques are available to me for launching one c# application ( console .exe) from another? For example, I know there is the Process and ProcessInfo classes, but these seem designed for launching non-CLR applications. Should I access the .exe as a reference?
3
6954
by: tyler.schlosser | last post by:
Hi there, I am trying to launch a program called AmiBroker using the command: AB = win32com.client.Dispatch("Broker.Application") However, I have a dual-core CPU and would like to launch two instances of AmiBroker. I know it is possible to run two instances simultaneously since it is easy to do manually by double-clicking the AmiBroker.exe file twice. However, when I write two lines of code like this:
4
1426
by: melon | last post by:
Let's say I have a program.exe file. When I run it, one instance of it will be created. If I run it again, then another instance will be created. Question is, is it possible for instance #2 to issue command to instance #1, or vice versa? Thanks
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.