Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ MFC GUI
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 4-Mar-13 23:31pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Amin Ur Rehman at 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)

  Print Answers RSS
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,614
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 5 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100