
29 May
2012
29 May
'12
5:33 p.m.
On Tue, May 29, 2012 at 7:19 PM, Alex Perry <Alex.Perry@smartlogic.com>wrote:
Having done things similar to this before (if never with any elegance). I think that the above won't work in all situations.
You guessed the implementation incorrectly. Please see the sources. I've always done it the way you said (with wmain/main), but this is why I said that Artyom's solution is more elegant. args doesn't even read the argc/argv arguments. It uses CommandLineToArgvW and GetEnvironmentStringsW to get the wide strings from Windows, then converts them to UTF-8 and assigns the pointer to it back to the local parameters of main. -- Yakov