Difference between WinMain and wWinMain

On Windows XP, if an application entry is WinMain, does Windows convert the command line from Unicode to Ansi and pass to the application?

Yes.

If the command line parameter must be in Unicode (for example, Unicode file name, conversion will cause some characters missing), does that mean that I must use wWinMain as the entry function?

Yes, you should, if you want to correctly handle Unicode arguments to your program.

The documentation to WinMain() on MSDN also agrees.

You can, however, also use GetCommandLineW to retrieve the command line specifically in Unicode.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)