>Anyone have a way to return an error level other than exitprocess. In my very simple example it works great but in a real world app its causing an illegal operation in kernel32...
Anything else ultimately turns into ExitProcess(), ie PostQuitMessage() will send a WM_DESTROY to the current thread's thread queue, but ultimately, it executes an ExitProcess() from inside the WinMain.