Exit with error in winmain

I want to exit and pop up an error at the start of winmain.
There is no window created yet.
Can I do it somehow?
[130 byte] By [WhorlyWhelk] at [2007-11-20 8:50:35]
# 1 Re: Exit with error in winmain
You can use MessageBox to popup a message, and then you can exit the application (not the other way around).

- petter
wildfrog at 2007-11-9 13:30:43 >
# 2 Re: Exit with error in winmain
Oooookay I just realized you don't need a window to use MessageBox. Thx. :)
WhorlyWhelk at 2007-11-9 13:31:43 >
# 3 Re: Exit with error in winmain
Like So:

#include <windows.h>

INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpArgs, INT iShow)
{
MessageBox(NULL, "Way Too Simple Of A Program", "My Box", MB_OK);
return 0;
}
bitshifter420 at 2007-11-9 13:32:51 >