Hi, I'm trying to get the arguments from commandline inside WinMain.
Im using this code:
LPWSTR *Arglist;
int nArgs;
Arglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);
for(int i=0; i<nArgs; i++) cout<<(LPSTR)Arglist[i]<<endl;
LocalFree(Arglist);
The code above work fine in VS2010. But in Code::Blocks it returns only the first character of each argument.
Would someone please tell me what I'm doing wrong?