From: m on
Uh - why?

The behaviour is easy to reproduce: create an application that does not use the CRT, or any other ENV, call certain APIs on some versions of Windows, and return from your entry point. The process will not die because ExitProcess was NOT called from the CRT wrapper code and there are running threads. To work around this problem, ensure that ExitProcess is always called.

As good programming practice, one should always clean up resources, including exiting worker threads, before process exit.

"Jonathan de Boyne Pollard" <J.deBoynePollard-newsgroups(a)NTLWorld.COM> wrote in message news:IU.20100115.015649.22ea.5(a)J.de.Boyne.Pollard.localhost...
In my experience, several of the Windows DLLs do not shutdown cleanly (specifically DNS APIs and others) and a call to ExitProcess from the main thread is necessary.

I suggest that you read the aforelinked, too. (-:





From: m on
And I did! They are interesting articles no doubt

BTW: I am sorry that I misinterpreted your previous post.
"Jonathan de Boyne Pollard" <J.deBoynePollard-newsgroups(a)NTLWorld.COM> wrote in message news:IU.20100120.035911.105a.0(a)J.de.Boyne.Pollard.localhost...
In my experience, several of the Windows DLLs do not shutdown cleanly (specifically DNS APIs and others) and a call to ExitProcess from the main thread is necessary.

I suggest that you read the aforelinked, too. (-:

Uh - why?

Because you'll find it edifying and interesting.