I have aplication A, it launch apliction B with ShellExecute.
I want to stop aplication B from aplication A.
Thanks for your time
I have aplication A, it launch apliction B with ShellExecute.
I want to stop aplication B from aplication A.
Thanks for your time
Send application B the WM_CLOSE message. If that doesnt close the application, then you can terminate the process. You can read more about this at:
http://support.microsoft.com/default...NoWebContent=1
The B process continues
I tried: TerminateProcess("som1",NULL);
Thanks for your time
>>I tried: TerminateProcess("som1",NULL);
TerminateProcess does NOT take a string and a pointer. You need to get a HANDLE to the target process, and specify an unsigned integer for an exit code. I don't know how you can get a handle to the process if you're using ShellExecute(), although if you use CreateProcess() instead you can specify the process ID in a call to OpenProcess() to get the process handle.
Once you have the handle, say theHandle, and an exit code, say exitCode with a value of 0:
TerminateProcess(theHandle, exitCode);
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.