WinMain is not mapped to main. CRT calls winmain instead of main if the app is defined as GUI app. It checks to see if the app is gui or console and switches between main and winmain. It appears only difference is that call to winmain calls GetModuleHandle(NULL) first.