Changeset 4236 for trunk/src/kernel32/winexepeldr.cpp
- Timestamp:
- Sep 12, 2000, 6:29:59 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winexepeldr.cpp
r3501 r4236 1 /* $Id: winexepeldr.cpp,v 1. 9 2000-05-09 18:56:09 sandervlExp $ */1 /* $Id: winexepeldr.cpp,v 1.10 2000-09-12 04:29:59 bird Exp $ */ 2 2 3 3 /* … … 47 47 //Called by ring 3 pe loader to create win32 executable 48 48 //****************************************************************************** 49 BOOL WIN32API CreateWin32PeLdrExe(char *szFileName, char *szCmdLine, ULONG reservedMem) 49 BOOL WIN32API CreateWin32PeLdrExe(char *szFileName, char *szCmdLine, ULONG reservedMem) 50 50 { 51 51 APIRET rc; … … 67 67 } 68 68 69 //exe length + space + (possibly) 2x'"' + cmd line length + 0 terminator 70 szFullCmdLine = (char *)malloc(strlen(szFileName) + 3 + strlen(szCmdLine) + 1); 71 //Enclose executable name in quotes if it (or it's directory) contains spaces 72 if(strchr(szFileName, ' ') != NULL) { 73 sprintf(szFullCmdLine, "\"%s\"", szFileName); 74 } 75 else strcpy(szFullCmdLine, szFileName); 76 strcat(szFullCmdLine, " "); 77 strcat(szFullCmdLine, szCmdLine); 78 WinExe->setCommandLine(szFullCmdLine); 79 dprintf(("Cmd line: %s", szFullCmdLine)); 80 free(szFullCmdLine); 69 /* Initiate the commandline. 70 * (Since PE.EXE takes no options we'll currently just skip the 71 * first parameter and used the passed in executable name.) 72 */ 73 szCmdLine = szCmdLine; /* ignored */ 74 InitCommandLine(szFileName); 81 75 82 76 if(getenv("WIN32_IOPL2")) { … … 95 89 return FALSE; 96 90 } 91 97 92 OS2UnsetExceptionHandler(&exceptFrame); 98 93 if(WinExe->isConsoleApp()) { … … 112 107 //****************************************************************************** 113 108 //****************************************************************************** 114 Win32PeLdrExe::Win32PeLdrExe(char *szFileName) : 115 Win32ImageBase(-1), 109 Win32PeLdrExe::Win32PeLdrExe(char *szFileName) : 110 Win32ImageBase(-1), 116 111 Win32ExeBase(-1), 117 112 Win32PeLdrImage(szFileName, TRUE)
Note:
See TracChangeset
for help on using the changeset viewer.