Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys,

I have an interesting query, I wonder if there is something like this we can do.

Basically, I have two products. Lets call them A.exe and B.exe

They can ofcourse run simultaneously. But what I want to implement is that when A "sees" that B is running, I want A to enter an "integrated" mode, whereby I do some GUI adjustment, etc, so that both products can run side my side.

The first method would be to run a thread and manually keep polling the processes to see if B.exe is running, if it is running, allow the user to enter the requested mode.
I don't want that, as this would make my program a bit too heavy for my liking, even if I poll the processes every 1-2 seconds.

Is there a better way to do this? For instance, is there a way that I could set up an interrupt in the program everytime a new process is started on my computer, and if that process is B.exe, I can do the required GUI adjustment? Can anyone give me a hint as to how I can go about to achieve this?
Posted

1 solution

From user mode you can’t get any event notification for process launch. If the process B is yours, then you can think about some Inter Process Communication mechanisms to achieve this.
 
Share this answer
 
Comments
weirdProgrammer-2 5-Mar-13 4:57am    
Yes, process B is mine...its just that I didn't want to touch it :D Ok, I will look into that I think. Thanks,

Best REgards,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900