Changeset 14984
- Timestamp:
- Oct 3, 2000, 10:17:20 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/src/kernel32/wprocess.cpp ¶
r14974 r14984 1 /* $Id: wprocess.cpp,v 1. 99 2000-10-03 17:28:32sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.100 2000-10-03 20:17:20 sandervl Exp $ */ 2 2 3 3 /* … … 1555 1555 if(lpCommandLine) { 1556 1556 //skip exe name in lpCommandLine 1557 //TODO: doesn't work for directories with spaces! 1557 1558 while(*lpCommandLine != 0 && *lpCommandLine != ' ') 1558 1559 lpCommandLine++; … … 1573 1574 sprintf(cmdline, "PE.EXE %s", lpCommandLine); 1574 1575 } 1576 char szAppName[255]; 1577 char *exename = szAppName; 1578 strncpy(szAppName, &cmdline[7], sizeof(szAppName)); //skip pe.exe 1579 szAppName[254] = 0; 1580 if(*exename == '"') { 1581 exename++; 1582 } 1583 1584 //TODO: doesn't work for directories with spaces! 1585 while(*exename != 0 && *exename != ' ' && *exename != '"') 1586 exename++; 1587 1588 if(*exename != 0) { 1589 *exename = 0; 1590 } 1591 if(szAppName[0] == '"') { 1592 exename = &szAppName[1]; 1593 } 1594 else exename = szAppName; 1595 1596 if(GetFileAttributesA(exename) == -1) { 1597 dprintf(("CreateProcess: can't find executable!")); 1598 SetLastError(ERROR_FILE_NOT_FOUND); 1599 return FALSE; 1600 } 1575 1601 dprintf(("KERNEL32: CreateProcess %s\n", cmdline)); 1576 1602 rc = O32_CreateProcess("PE.EXE", (LPCSTR)cmdline,lpProcessAttributes,
Note:
See TracChangeset
for help on using the changeset viewer.