Link to home
Start Free TrialLog in
Avatar of petterton
petterton

asked on

Hiding an application from another application

I have this Windows software program (let's call it appA), which from time to time starts another program (appB.exe) to make some calculations. AppB is just a console application, so I assume that appA collects its information from appB by reading stdout. (AppA is a commercial software package, and I have no info on how this is done)

My problem is that I, in my C# application, also start an instant of appB.exe. When I do this, it seems like appA mixes up the two instances of appB, so that the connection between appA and appB is no longer working. Is it possible for me in my C# application to start appB, in some way or another, so that it is not confused with the instant of appB already running. I know this can be a tricky question to answer, as I do not know what mechanism appA uses to recognize appB once it has started. I have tried something as simple as making a copy of and renaming the appB.exe but that did not help. Any suggestions?
Avatar of ravs120499
ravs120499

Do you have the code for AppB? That should tell you how the communication happens.

Perhaps they communicate via pipes or shared memory, in some way such that the second instance of appB is not being prevented from joining the party, but is somehow confusing matters.
ASKER CERTIFIED SOLUTION
Avatar of basicinstinct
basicinstinct
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of petterton

ASKER

Since I call AppB myself from my application, I am quite sure how AppA calls it. AppB is called with some options from the command line, and writes its output as text to the console. So to obtain the output you just need to redirect its standard output. There is no two-way communication set up between the two applications besides this.

I will try the suggestion to run Process Monitor and see if I can make anything out of that.

I realized that the problem was not due to mixing up the communication with the two instances of AppB anyway. I will anyhow reward the points to basicinstinct, as "Process Monitor" helped me working out this.