- Timestamp:
- Nov 13, 1999, 4:41:11 PM (26 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winexepeldr.cpp
r1284 r1720 1 /* $Id: winexepeldr.cpp,v 1. 3 1999-10-14 09:57:34sandervl Exp $ */1 /* $Id: winexepeldr.cpp,v 1.4 1999-11-13 15:41:10 sandervl Exp $ */ 2 2 3 3 /* … … 34 34 35 35 #include "cio.h" 36 #include "oslibmisc.h" 37 38 extern char szErrorTitle[]; 39 extern char szErrorModule[]; 36 40 37 41 //****************************************************************************** … … 68 72 OS2SetExceptionHandler(&exceptFrame); 69 73 if(WinExe->init(reservedMem) == FALSE) { 74 if(szErrorModule[0] != 0) { 75 char szErrorMsg[128]; 76 77 sprintf(szErrorMsg, "Can't execute %s due to bad or missing %s", OSLibStripPath(szFileName), szErrorModule); 78 WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, szErrorMsg, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE); 79 } 70 80 delete WinExe; 71 81 return FALSE; -
trunk/src/kernel32/winimagepeldr.cpp
r1708 r1720 1 /* $Id: winimagepeldr.cpp,v 1.1 2 1999-11-11 19:10:09sandervl Exp $ */1 /* $Id: winimagepeldr.cpp,v 1.13 1999-11-13 15:41:11 sandervl Exp $ */ 2 2 3 3 /* … … 53 53 char szExeErrorMsg[] = "File isn't an executable"; 54 54 char szInteralErrorMsg[]= "Internal Error"; 55 char szErrorModule[128] = ""; 55 56 56 57 #ifndef max … … 136 137 BOOL Win32PeLdrImage::init(ULONG reservedMem) 137 138 { 138 char szErrorMsg[64];139 139 LPVOID win32file = NULL; 140 140 ULONG filesize, ulRead; … … 148 148 149 149 if (fImgMapping == -1) { 150 sprintf(szErrorMsg, "Unable to open %32s\n", szFileName); 151 WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, szErrorMsg, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE); 150 strcpy(szErrorModule, OSLibStripPath(szFileName)); 152 151 goto failure; 153 152 } … … 1089 1088 if(rc) { 1090 1089 dprintf(("DosLoadModule returned %X for %s\n", rc, szModuleFailure)); 1090 sprintf(szErrorModule, "%s.DLL", szModuleFailure); 1091 1091 errorState = rc; 1092 1092 return(FALSE); … … 1113 1113 if(WinDll->init(0) == FALSE) { 1114 1114 fout << "Internal WinDll error " << WinDll->getError() << endl; 1115 strcpy(szErrorModule, OSLibStripPath(modname)); 1115 1116 return(FALSE); 1116 1117 } -
trunk/src/peldr/makefile
r1459 r1720 1 # $Id: makefile,v 1.1 0 1999-10-26 17:54:42sandervl Exp $1 # $Id: makefile,v 1.11 1999-11-13 15:40:51 sandervl Exp $ 2 2 3 3 # … … 49 49 50 50 clean: 51 $(RM) *.obj *.lib *.dll * ~ *.map *.pch *.exe51 $(RM) *.obj *.lib *.dll *.map *.pch *.exe 52 52 $(RM) $(PDWIN32_BIN)\$(TARGET).exe 53 53 $(RM) $(PDWIN32_BIN)\$(TARGETDLL).dll -
trunk/src/peldr/pe.cpp
r1239 r1720 1 /* $Id: pe.cpp,v 1.1 0 1999-10-10 08:58:51sandervl Exp $ */1 /* $Id: pe.cpp,v 1.11 1999-11-13 15:39:45 sandervl Exp $ */ 2 2 3 3 /* … … 37 37 char szExeErrorMsg[] = "File isn't an executable"; 38 38 char szInteralErrorMsg[]= "Internal Error"; 39 char szNoKernel32Msg[] = "Can't load/find kernel32.dll"; 39 40 40 41 char fullpath[CCHMAXPATH]; … … 77 78 rc = DosQueryProcAddr(hmodPMWin, ORD_WIN32MESSAGEBOX, NULL, (PFN *)&MyWinMessageBox); 78 79 79 rc = DosLoadModule(exeName, sizeof(exeName), "KERNEL32.DLL", &hmodKernel32);80 rc = DosQueryProcAddr(hmodKernel32, 0, "_CreateWin32PeLdrExe@8", (PFN *)&CreateWin32Exe);81 82 80 if ((hab = MyWinInitialize(0)) == 0L) /* Initialize PM */ 83 81 goto fail; … … 90 88 } 91 89 90 rc = DosLoadModule(exeName, sizeof(exeName), "KERNEL32.DLL", &hmodKernel32); 91 if(rc) { 92 MyWinMessageBox(HWND_DESKTOP, NULL, szNoKernel32Msg, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE); 93 goto fail; 94 } 95 rc = DosQueryProcAddr(hmodKernel32, 0, "_CreateWin32PeLdrExe@8", (PFN *)&CreateWin32Exe); 96 92 97 strcpy(exeName, argv[1]); 93 98 strupr(exeName); … … 96 101 } 97 102 if(CreateWin32Exe(exeName, ReserveMem()) == FALSE) { 98 MyWinMessageBox(HWND_DESKTOP, HWND_DESKTOP, szLoadErrorMsg, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE);99 103 goto fail; 100 104 }
Note:
See TracChangeset
for help on using the changeset viewer.