|
|
@ -153,7 +153,7 @@ int __stdcall WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdLine, int |
|
|
|
int ret, i; |
|
|
|
int ret, i; |
|
|
|
|
|
|
|
|
|
|
|
lpArgv = CommandLineToArgvW( GetCommandLineW(), &szArgc ); |
|
|
|
lpArgv = CommandLineToArgvW( GetCommandLineW(), &szArgc ); |
|
|
|
szArgv = ( char** )malloc( szArgc * sizeof( char* )); |
|
|
|
szArgv = ( char** )malloc( (szArgc + 1) * sizeof( char* )); |
|
|
|
|
|
|
|
|
|
|
|
for( i = 0; i < szArgc; ++i ) |
|
|
|
for( i = 0; i < szArgc; ++i ) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -161,6 +161,7 @@ int __stdcall WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdLine, int |
|
|
|
szArgv[i] = ( char* )malloc( size ); |
|
|
|
szArgv[i] = ( char* )malloc( size ); |
|
|
|
wcstombs( szArgv[i], lpArgv[i], size ); |
|
|
|
wcstombs( szArgv[i], lpArgv[i], size ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
szArgv[szArgc] = 0; |
|
|
|
|
|
|
|
|
|
|
|
LocalFree( lpArgv ); |
|
|
|
LocalFree( lpArgv ); |
|
|
|
|
|
|
|
|
|
|
|