Monday, June 29, 2009

wmain parameters corrupted?

Well, that was frustrating. I was trying to get command line parameters passed into the unicode wmain function defined as

int wmain( int argc, wchar_t *argv[]);

But I was getting corrupt looking bizarre values placed into argc and argv.
My problem was that in Visual Studio, I set the linker option for the entry point as wmain, but it has to be

wmainCRTStartup

Don't make the same mistake.

No comments: