Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Process keeps running when ExitProcess is called

$
0
0

Here is my code:

int APIENTRY WinMain(HINSTANCE hInstance,    HINSTANCE hPrevInstance,    LPSTR     lpCmdLine,    int       nCmdShow)
{    MainThread();    OutputDebugString("message 1");    ExitProcess(0);    OutputDebugString("message 2");
    return 0;
}

There is a message in debug window "message 1", there is no message "message 2" and my process keeps running in task manager.



Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>