Changeset 4445 for trunk/src/kernel32/wprocess.cpp
- Timestamp:
- Oct 6, 2000, 5:16:07 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/wprocess.cpp
r4422 r4445 1 /* $Id: wprocess.cpp,v 1.10 1 2000-10-04 19:36:26sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.102 2000-10-06 15:16:07 sandervl Exp $ */ 2 2 3 3 /* … … 1563 1563 } 1564 1564 cmdline = (char *)malloc(strlen(lpApplicationName)+strlen(lpCommandLine) + 16); 1565 sprintf(cmdline, " PE.EXE%s %s", lpApplicationName, lpCommandLine);1565 sprintf(cmdline, "%s %s", lpApplicationName, lpCommandLine); 1566 1566 } 1567 1567 else { 1568 1568 cmdline = (char *)malloc(strlen(lpApplicationName) + 16); 1569 sprintf(cmdline, " PE.EXE%s", lpApplicationName);1569 sprintf(cmdline, "%s", lpApplicationName); 1570 1570 } 1571 1571 } 1572 1572 else { 1573 1573 cmdline = (char *)malloc(strlen(lpCommandLine) + 16); 1574 sprintf(cmdline, " PE.EXE%s", lpCommandLine);1574 sprintf(cmdline, "%s", lpCommandLine); 1575 1575 } 1576 1576 char szAppName[255]; 1577 1577 char *exename = szAppName; 1578 strncpy(szAppName, &cmdline[7], sizeof(szAppName)); //skip pe.exe1578 strncpy(szAppName, cmdline, sizeof(szAppName)); 1579 1579 szAppName[254] = 0; 1580 1580 if(*exename == '"') { … … 1600 1600 } 1601 1601 dprintf(("KERNEL32: CreateProcess %s\n", cmdline)); 1602 1603 //SvL: Allright. Before we call O32_CreateProcess, we must take care of 1604 // lpCurrentDirectory ourselves. (Open32 ignores it!) 1605 if(lpCurrentDirectory) { 1606 char *newcmdline; 1607 1608 newcmdline = (char *)malloc(strlen(lpCurrentDirectory) + strlen(cmdline) + 32); 1609 sprintf(newcmdline, "PE.EXE /OPT:[CURDIR=%s] %s", lpCurrentDirectory, cmdline); 1610 free(cmdline); 1611 cmdline = newcmdline; 1612 } 1613 else { 1614 char *newcmdline; 1615 1616 newcmdline = (char *)malloc(strlen(cmdline) + 16); 1617 sprintf(newcmdline, "PE.EXE %s", cmdline); 1618 free(cmdline); 1619 cmdline = newcmdline; 1620 } 1602 1621 rc = O32_CreateProcess("PE.EXE", (LPCSTR)cmdline,lpProcessAttributes, 1603 1622 lpThreadAttributes, bInheritHandles, dwCreationFlags, 1604 1623 lpEnvironment, lpCurrentDirectory, lpStartupInfo, 1605 1624 lpProcessInfo); 1606 if(rc == TRUE) { 1625 if(rc == TRUE) 1626 { 1607 1627 if (dwCreationFlags & DEBUG_PROCESS && pThreadDB != NULL) 1608 1628 {
Note:
See TracChangeset
for help on using the changeset viewer.