Changeset 4445 for trunk/src/peldr
- Timestamp:
 - Oct 6, 2000, 5:16:07 PM (25 years ago)
 - File:
 - 
      
- 1 edited
 
- 
          
  trunk/src/peldr/pe.cpp (modified) (5 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/src/peldr/pe.cpp
r4441 r4445 1 /* $Id: pe.cpp,v 1.2 2 2000-10-06 11:04:42sandervl Exp $ */1 /* $Id: pe.cpp,v 1.23 2000-10-06 15:15:25 sandervl Exp $ */ 2 2 3 3 /* 4 4 * PELDR main exe loader code 5 5 * 6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)6 * Copyright 1998-2000 Sander van Leeuwen (sandervl@xs4all.nl) 7 7 * 8 * Command line options: 9 * /OPT:[x1=y,x2=z,..] 10 * x = CURDIR -> set current directory to y 11 * (not other options available at this time) 8 12 * 9 13 * Project Odin Software License can be found in LICENSE.TXT … … 63 67 64 68 //should be the same as in ..\kernel32\winexepeldr.h 65 typedef BOOL (* WIN32API WIN32CTOR)(char *, char *, ULONG, BOOL);69 typedef BOOL (* WIN32API WIN32CTOR)(char *, char *, char *, ULONG, BOOL); 66 70 67 71 WIN32CTOR CreateWin32Exe = 0; … … 83 87 PTIB ptib; 84 88 PPIB ppib; 85 char *cmdline, *win32cmdline ;89 char *cmdline, *win32cmdline, *peoptions, *newcmdline; 86 90 BOOL fQuote = FALSE; 87 91 int nrTries = 1; … … 92 96 cmdline = ppib->pib_pchcmd; 93 97 cmdline += strlen(cmdline)+1; //skip pe.exe 98 peoptions = strstr(cmdline, "/OPT:["); 99 if(peoptions) { 100 newcmdline = strchr(peoptions, ']'); 101 if(newcmdline) { 102 cmdline = newcmdline+1; 103 } 104 else DebugInt3(); //should not happen! 105 } 94 106 while(*cmdline == ' ') cmdline++; //skip leading space 95 107 if(*cmdline == '"') { … … 186 198 goto fail; 187 199 } 188 rc = DosQueryProcAddr(hmodKernel32, 0, "_CreateWin32PeLdrExe@ 16", (PFN *)&CreateWin32Exe);189 190 if(CreateWin32Exe(exeName, win32cmdline, reservedMemory, fConsoleApp) == FALSE) {200 rc = DosQueryProcAddr(hmodKernel32, 0, "_CreateWin32PeLdrExe@20", (PFN *)&CreateWin32Exe); 201 202 if(CreateWin32Exe(exeName, win32cmdline, peoptions, reservedMemory, fConsoleApp) == FALSE) { 191 203 goto fail; 192 204 }  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  