Changeset 9449 for trunk/src/kernel32/wprocess.cpp
- Timestamp:
- Dec 2, 2002, 10:34:46 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/wprocess.cpp
r9262 r9449 1 /* $Id: wprocess.cpp,v 1.1 59 2002-09-18 10:58:48sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.160 2002-12-02 09:34:46 sandervl Exp $ */ 2 2 3 3 /* … … 1398 1398 if (rc == NO_ERROR) 1399 1399 { 1400 // PH 2002-04-11 1401 // Note: intentional memory leak, pszCmdLineW will not be freed 1402 // or allocated after process startup 1400 // PH 2002-04-11 1401 // Note: intentional memory leak, pszCmdLineW will not be freed 1402 // or allocated after process startup 1403 cch = strlen(pszCmdLineA) + 1; 1404 1403 1405 pszCmdLineW = (WCHAR*)malloc(cch * 2); 1404 if (pszCmdLineW != NULL) 1405 AsciiToUnicode(pszCmdLineA, (WCHAR*)pszCmdLineW); 1406 if (pszCmdLineW != NULL) { 1407 //Translate from OS/2 to Windows codepage & ascii to unicode 1408 MultiByteToWideChar(CP_OEMCP, 0, pszCmdLineA, -1, (LPWSTR)pszCmdLineW, cch-1); 1409 ((LPWSTR)pszCmdLineW)[cch-1] = 0; 1410 1411 //ascii command line is still in OS/2 codepage, so convert it 1412 WideCharToMultiByte(CP_ACP, 0, pszCmdLineW, -1, (LPSTR)pszCmdLineA, cch-1, 0, NULL); 1413 ((LPSTR)pszCmdLineA)[cch-1] = 0; 1414 } 1406 1415 else 1407 1416 { 1417 DebugInt3(); 1408 1418 dprintf(("KERNEL32: InitCommandLine(%p): malloc(%d) failed (2)\n", pszPeExe, cch)); 1409 1419 rc = ERROR_NOT_ENOUGH_MEMORY;
Note:
See TracChangeset
for help on using the changeset viewer.