- Timestamp:
- Dec 28, 2002, 2:40:10 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/peldr/pe.cpp
r9536 r9556 1 /* $Id: pe.cpp,v 1.3 5 2002-12-20 11:38:55sandervl Exp $ */1 /* $Id: pe.cpp,v 1.36 2002-12-28 13:40:10 sandervl Exp $ */ 2 2 3 3 /* … … 44 44 char szExeErrorMsg[] = "%s isn't an executable"; 45 45 char szInteralErrorMsg[]= "Internal Error while loading %s"; 46 char szInteralErrorMsg1[]= "Internal Error"; 46 47 char szNoKernel32Msg[] = "Can't load/find kernel32.dll (rc=%d, module %s)"; 47 48 char szDosInfoBlocks[] = "DosInfoBlocks failed!"; … … 98 99 BOOL fQuote = FALSE, fVioConsole, fIsNEExe, fEndOfCmdLine = FALSE; 99 100 int nrTries = 1; 101 102 if(DosGetInfoBlocks(&ptib, &ppib) == 0) 103 { 104 char *pszTemp; 105 106 fullpath[0] = 0; 107 DosQueryModuleName(ppib->pib_hmte, sizeof(fullpath), fullpath); 108 109 strupr(fullpath); 110 #ifdef COMMAND_LINE_VERSION 111 pszTemp = strstr(fullpath, "PEC.EXE"); 112 #else 113 pszTemp = strstr(fullpath, "PE.EXE"); 114 #endif 115 if(pszTemp == NULL) { 116 pszErrorMsg = szInteralErrorMsg1; 117 goto failerror; 118 } 119 pszTemp--; //to go trailing backslash 120 *pszTemp = 0; 121 strcat(fullpath, ";%BeginLIBPATH%"); 122 DosSetExtLIBPATH(fullpath, BEGIN_LIBPATH); 123 } 100 124 101 125 if(argc >= 2) {
Note:
See TracChangeset
for help on using the changeset viewer.