Click here to Skip to main content
16,016,613 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: vcspawn.exe is not found Pin
jmkhael2-Jun-04 2:37
jmkhael2-Jun-04 2:37 
GeneralRe: vcspawn.exe is not found Pin
Member 656282-Jun-04 2:44
Member 656282-Jun-04 2:44 
GeneralRe: vcspawn.exe is not found Pin
jmkhael2-Jun-04 3:19
jmkhael2-Jun-04 3:19 
GeneralRe: vcspawn.exe is not found Pin
Member 656282-Jun-04 4:07
Member 656282-Jun-04 4:07 
QuestionCEvent? Pin
MrEyes2-Jun-04 1:23
MrEyes2-Jun-04 1:23 
AnswerRe: CEvent? Pin
erkanina2-Jun-04 1:35
erkanina2-Jun-04 1:35 
GeneralRe: CEvent? Pin
MrEyes2-Jun-04 1:37
MrEyes2-Jun-04 1:37 
AnswerRe: CEvent? Pin
Blake Miller2-Jun-04 4:05
Blake Miller2-Jun-04 4:05 
Here are some, but not all, options:
You first need to determine how the other program will be able to respond to the request to shutdown.
1. Event: If you want to watch for an event, then you must have a WaitForSingleObject, WaitForMultipleObjects, etc. call in your C++ program. You can code in a periodic check where you can try to wait for the object for a very brief time, like 50 milliseconds or less. If it is already signaled, then you can exit the C++ program, if you get TIMEOUT, then the event was not already signaled by the C# program.
2. You might also be able to use PostThreadMessage if you had some way to determine what the main thread identifier of the C++ progrma was, then you could watch for a registered window message in the C++ progrma and terminate, or else some other message of your choosing, use the MsgWaitForMultipleObjects to get the message.
3. If the C++ program has a window and you can determine the window handle, you can then just post a WM_CLOSE to the C++ program's main window.
4. If the C++ program has a window and you can NOT determine the window handle, you can always try a SendMessage with a registered window message that the C++ program is watching for.

GeneralRe: CEvent? Pin
MrEyes2-Jun-04 4:21
MrEyes2-Jun-04 4:21 
GeneralRe: CEvent? Pin
Blake Miller2-Jun-04 4:34
Blake Miller2-Jun-04 4:34 
GeneralRe: CEvent? Pin
David Chamberlain2-Jun-04 6:05
David Chamberlain2-Jun-04 6:05 
GeneralSocket messages Pin
erkanina2-Jun-04 1:22
erkanina2-Jun-04 1:22 
GeneralRe: Socket messages Pin
Trollslayer2-Jun-04 1:33
mentorTrollslayer2-Jun-04 1:33 
GeneralRe: Socket messages Pin
Antony M Kancidrowski2-Jun-04 1:33
Antony M Kancidrowski2-Jun-04 1:33 
GeneralRe: Socket messages Pin
erkanina2-Jun-04 1:54
erkanina2-Jun-04 1:54 
GeneralRe: Socket messages Pin
erkanina2-Jun-04 2:03
erkanina2-Jun-04 2:03 
Generalworking with CToolTipCtrl Pin
Aviv Halperin2-Jun-04 1:01
Aviv Halperin2-Jun-04 1:01 
GeneralI wnt to convert SDI project to MDI Pin
auur2-Jun-04 1:00
auur2-Jun-04 1:00 
GeneralRe: I wnt to convert SDI project to MDI Pin
David Crow2-Jun-04 3:08
David Crow2-Jun-04 3:08 
Generalwindows services Pin
Csharper992-Jun-04 0:57
Csharper992-Jun-04 0:57 
GeneralRe: windows services Pin
David Crow2-Jun-04 3:09
David Crow2-Jun-04 3:09 
GeneralRe: windows services Pin
Blake Miller2-Jun-04 4:14
Blake Miller2-Jun-04 4:14 
GeneralMenu Item Bitmap Pin
amine.turki2-Jun-04 0:51
amine.turki2-Jun-04 0:51 
GeneralRe: Menu Item Bitmap Pin
Anonymous2-Jun-04 1:31
Anonymous2-Jun-04 1:31 
GeneralMenu Item Bitmap Pin
amine.turki2-Jun-04 0:51
amine.turki2-Jun-04 0:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.