|
-
May 18th, 1999, 11:06 AM
#1
ExitProcess
Hi,
From my NT Service(non MFC), I call ExitProcess() to kill a MFC app. But ExitProcess doesn't work. It doesn't exit the process.
Does anyone have any clue ? Any other ways to kill MFC app ?
I used TerminateProcess(), but by calling it, the MFC app is getting killed but, the destructor code is not getting executed.
You input will be appreciated.
Here is the code -
//Open the process to get the handle for get
HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION, FALSE, m_dwProcessID);
if(hProcess)
{
GetExitCodeProcess(hProcess, lpExitCode);
CloseHandle(hProcess);
}
if(lpExitCode)
{
ExitProcess((UINT)lpExitCode);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|