Changeset 506
- Timestamp:
- Aug 16, 1999, 3:56:54 PM (26 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
-
changelog (modified) (5 diffs)
-
include/winexe.h (modified) (2 diffs)
-
src/kernel32/KERNEL32.DEF (modified) (2 diffs)
-
src/kernel32/winexe.cpp (modified) (2 diffs)
-
src/peldr/initterm.cpp (added)
-
src/peldr/makefile (modified) (3 diffs)
-
src/peldr/pe.cpp (modified) (6 diffs)
-
src/peldr/pe.h (modified) (2 diffs)
-
src/peldr/peldr.def (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/changelog
r505 r506 1 /* $Id: changelog,v 1.85 1999-08-16 10:32:47 phaller Exp $ */ 1 /* $Id: changelog,v 1.86 1999-08-16 13:56:54 sandervl Exp $ */ 2 99-08-16: Sander van Leeuwen <sandervl@xs4all.nl> 3 - PE loader: Started with rewrite 2 4 3 5 99-08-16: Patrick Haller <phaller@gmx.net> … … 5 7 6 8 99-08-16: Christoph Bratschi <cbratschi@datacomm.ch> 7 - USER32: uitools.cpp update9 - USER32: uitools.cpp update 8 10 9 11 99-08-15: Christoph Bratschi <cbratschi@datacomm.ch> … … 14 16 15 17 99-08-14: Sander van Leeuwen <sandervl@xs4all.nl> 16 - INCLUDE\win\windows.h: Include odin.h if __WIN32OS2__ is defined18 - INCLUDE\win\windows.h: Include odin.h if __WIN32OS2__ is defined 17 19 18 20 99-08-13: Sander van Leeuwen <sandervl@xs4all.nl> 19 - KERNEL32: Export heap functions by ordinal20 - src\makefile: compile lz32 before version (dependency)21 - KERNEL32: Export heap functions by ordinal 22 - src\makefile: compile lz32 before version (dependency) 21 23 22 24 99-08-12: Patrick Haller <phaller@gmx.net> 23 - VERSION: enhanced plus odinwrap macros25 - VERSION: enhanced plus odinwrap macros 24 26 25 27 99-08-11: Patrick Haller <phaller@gmx.net> 26 - ODINCRT: ordinal exports27 - ADVAPI32:odinwrap macros (partially)28 - ODINCRT: ordinal exports 29 - ADVAPI32:odinwrap macros (partially) 28 30 - LZ32: odinwrap macros 29 31 30 32 99-08-10: Sander van Leeuwen <sandervl@xs4all.nl> 31 - USER32/NEW: Fixed makefile (link with odincrt)33 - USER32/NEW: Fixed makefile (link with odincrt) 32 34 33 35 99-08-10: Patrick Haller <phaller@gmx.net> 34 - LZ32: added preliminary support for independend LZ32 library36 - LZ32: added preliminary support for independend LZ32 library 35 37 36 38 99-08-09: Patrick Haller <phaller@gmx.net>, Achim Hasenmueller <achimha@innotek.de>, Markus Montkowski 37 - ODINCRT: providing a extensible wrapping layer for VAC++ runtime functions38 change is non-intrusive for existing source.39 - ODINCRT: providing a extensible wrapping layer for VAC++ runtime functions 40 change is non-intrusive for existing source. 39 41 40 42 99-08-06: Patrick Haller <phaller@gmx.net> 41 - USER32: added stubs so NT4's WINFILE can load42 - SHELL32: added stubs so NT4's WINFILE can load43 - NTDLL: added stubs so NT4's WINFILE can load43 - USER32: added stubs so NT4's WINFILE can load 44 - SHELL32: added stubs so NT4's WINFILE can load 45 - NTDLL: added stubs so NT4's WINFILE can load 44 46 45 47 99-08-05: Patrick Haller <phaller@gmx.net> 46 - KERNEL32: interactive control over UnhandledExceptionFilter48 - KERNEL32: interactive control over UnhandledExceptionFilter 47 49 - KERNEL32: FormatMessageAW fixed. Do not mix ODIN's heap functions with VAC heap functions 48 - KERNEL32: added WINE-style string functions in Heapstring.cpp49 - SHELL3232: RestartDialog @59 stub added. IE2 can load now with NT4's URL.DLL.50 - KERNEL32: added WINE-style string functions in Heapstring.cpp 51 - SHELL3232: RestartDialog @59 stub added. IE2 can load now with NT4's URL.DLL. 50 52 51 53 99-08-05: Sander van Leeuwen <sandervl@xs4all.nl> 52 - KERNEL32: Bitmap conversion bugfix; always recalculate bitmap size53 (bitmap in donut.exe (ddraw sample) contains wrong size)54 - KERNEL32: Bitmap conversion bugfix; always recalculate bitmap size 55 (bitmap in donut.exe (ddraw sample) contains wrong size) 54 56 55 57 99-08-04: Patrick Haller <phaller@gmx.net> 56 - KERNEL32: fix for filename handling in kernel32/profile57 - KERNEL32: fix for PROFILE_CopyEntry in kernel32/profile58 - KERNEL32: fix for filename handling in kernel32/profile 59 - KERNEL32: fix for PROFILE_CopyEntry in kernel32/profile 58 60 59 61 99-08-04: Sander van Leeuwen <sandervl@xs4all.nl> 60 - PE2LX: Bugfix for icon conversion (heap corruption for ra95.exe; as62 - PE2LX: Bugfix for icon conversion (heap corruption for ra95.exe; as 61 63 reported by Patrick Haller) 62 64 63 65 99-08-04: Patrick Haller <phaller@gmx.net> 64 - KERNEL32: Heap modification65 - KERNEL32: Windows 3 style profile support ported from WINE (removes Open32)66 - KERNEL32: Heap modification 67 - KERNEL32: Windows 3 style profile support ported from WINE (removes Open32) 66 68 67 69 99-08-03: Rene Pronk <R.Pronk@twi.tudelft.nl> 68 - USER32: Ported DrawTextExA/W & DrawStateA/W70 - USER32: Ported DrawTextExA/W & DrawStateA/W 69 71 70 72 99-07-27: Przemysaw Dobrowolski <dobrawka@asua.org.pl> 71 - KERNEL32: Implemented GetComputerNameA/W73 - KERNEL32: Implemented GetComputerNameA/W 72 74 73 75 99-07-25: Sander van Leeuwen <sandervl@xs4all.nl> 74 - USER32/NEW: Lots of changes; Solitaire displays cards correctly75 Status bar correctly drawn76 Mouse msg translation still wrong.77 Paint not correct.76 - USER32/NEW: Lots of changes; Solitaire displays cards correctly 77 Status bar correctly drawn 78 Mouse msg translation still wrong. 79 Paint not correct. 78 80 79 81 99-07-25: Sander van Leeuwen <sandervl@xs4all.nl> 80 - KERNEL32: GetLocateInfoA bugfix81 - USER32/NEW: Lots of changes; now Solitaire starts, but draws cards incorrectly82 - KERNEL32: GetLocateInfoA bugfix 83 - USER32/NEW: Lots of changes; now Solitaire starts, but draws cards incorrectly 82 84 83 85 99-07-23: Yuri Dario <mc6530@mclink.it> 84 - misc: Changes for compilation with VAC 3.6.586 - misc: Changes for compilation with VAC 3.6.5 85 87 86 88 99-07-23: Edgar Buerkle <100566.557@compuserve.com> 87 - VERSION: VerQueryValueA/W Wine implementation ported89 - VERSION: VerQueryValueA/W Wine implementation ported 88 90 89 91 99-07-22: Przemysaw Dobrowolski <dobrawka@asua.org.pl> 90 - KERNEL32: Complete implementation of GetLocaleInfoA/W92 - KERNEL32: Complete implementation of GetLocaleInfoA/W 91 93 92 94 99-07-22: Edgar Buerkle <100566.557@compuserve.com> 93 - KERNEL32: Fix for OS2GetResource (os2util.cpp)94 - PE2LX: Use unique resource id for version resource.95 - USER32: MapOEMToRealKey fix95 - KERNEL32: Fix for OS2GetResource (os2util.cpp) 96 - PE2LX: Use unique resource id for version resource. 97 - USER32: MapOEMToRealKey fix 96 98 97 99 99-07-22: Sander van Leeuwen <sandervl@xs4all.nl> 98 - DDRAW: Now compiles99 - COMCTL32: Create library with correct api names100 - DDRAW: Now compiles 101 - COMCTL32: Create library with correct api names 100 102 101 103 99-07-21: Edgar Buerkle <100566.557@compuserve.com> 102 - KERNEL32: Fix for LoadResource; should return pointer to resource data104 - KERNEL32: Fix for LoadResource; should return pointer to resource data 103 105 LockResource just returns the pointer returned by LoadResource 104 106 105 107 99-07-20: Sander van Leeuwen <sandervl@xs4all.nl> 106 - USER32/NEW: Added support for window icons and accelerators. 107 Accelerators don't work yet.108 - PE2LX: Save icons in different format (BITMAPINFOHEADER2) 108 - USER32/NEW: Added support for window icons and accelerators. 109 Accelerators don't work yet. 110 - PE2LX: Save icons in different format (BITMAPINFOHEADER2) 109 111 110 112 99-07-19: Sander van Leeuwen <sandervl@xs4all.nl> 111 - KERNEL32: Added method for retrieving converted OS/2 resource113 - KERNEL32: Added method for retrieving converted OS/2 resource 112 114 (which will be changed later on) 113 - USER32/NEW: CreateWindowEx now works and menus are displayed115 - USER32/NEW: CreateWindowEx now works and menus are displayed 114 116 115 117 99-07-17: Sander van Leeuwen <sandervl@xs4all.nl> 116 118 - KERNEL32: Exports for getting TEB & THDB added 117 119 118 120 99-07-15: Sander van Leeuwen <sandervl@xs4all.nl> 119 121 - USER32/NEW: Unicode & window handle translation bugfixes … … 124 126 125 127 99-07-13: Sander van Leeuwen <sandervl@xs4all.nl> 126 - USER32/NEW: *VERY* preliminary/alpha code for Open32 replacement in user32128 - USER32/NEW: *VERY* preliminary/alpha code for Open32 replacement in user32 127 129 Compiles, but not tested at all. 128 130 … … 131 133 132 134 99-07-10: Edgar Buerkle <100566.557@compuserve.com> 133 - USER32: Fixes for CreateWindowExW and several unicode menu apis135 - USER32: Fixes for CreateWindowExW and several unicode menu apis 134 136 135 137 99-07-07: Sander van Leeuwen <sandervl@xs4all.nl> 136 - KERNEL32/PE2LX: Added support for TLS sections137 - KERNEL32: Added thread attach/detach messages for dlls138 Fixed some bugs, cleaned up code139 NOTE: THIS CHANGE BREAKS ALL PREVIOUSLY CONVERTED APPLICATIONS140 RECOMPILE ALL DLLS AND CONVERT EVERYTHING AGAIN!!!!!!!!!141 THIS CHANGE ALSO BREAKS WIN32K!138 - KERNEL32/PE2LX: Added support for TLS sections 139 - KERNEL32: Added thread attach/detach messages for dlls 140 Fixed some bugs, cleaned up code 141 NOTE: THIS CHANGE BREAKS ALL PREVIOUSLY CONVERTED APPLICATIONS 142 RECOMPILE ALL DLLS AND CONVERT EVERYTHING AGAIN!!!!!!!!! 143 THIS CHANGE ALSO BREAKS WIN32K! 142 144 143 145 99-07-06: Patrick Haller <phaller@gmx.net> 144 - KERNEL32: major enhancement of handlemanager146 - KERNEL32: major enhancement of handlemanager 145 147 146 148 99-07-06: Edgar Buerkle <100566.557@compuserve.com> 147 - PE2LX: Finished support for codepages149 - PE2LX: Finished support for codepages 148 150 149 151 99-07-05: Patrick Haller <phaller@gmx.net> -
trunk/include/winexe.h
r10 r506 1 /* $Id: winexe.h,v 1. 2 1999-05-27 15:17:59 phallerExp $ */1 /* $Id: winexe.h,v 1.3 1999-08-16 13:55:27 sandervl Exp $ */ 2 2 3 3 /* … … 19 19 20 20 typedef ULONG (* WIN32API WIN32EXEENTRY)(); 21 22 class Win32Exe; 23 typedef Win32Exe *(* WIN32API WIN32CTOR)(char *); 21 24 22 25 class Win32Exe : public Win32Image -
trunk/src/kernel32/KERNEL32.DEF
r493 r506 1 ; $Id: KERNEL32.DEF,v 1. 19 1999-08-13 18:38:19sandervl Exp $1 ; $Id: KERNEL32.DEF,v 1.20 1999-08-16 13:54:32 sandervl Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 980 980 GetThreadTHDB = _GetThreadTHDB@0 @1235 981 981 982 CreateWin32Exe = _CreateWin32Exe@4 @1236 983 982 984 ; HEAP Management (heap.cpp, heapstring.cpp) 983 985 HEAP_xalloc = _HEAP_xalloc@12 @1240 -
trunk/src/kernel32/winexe.cpp
r281 r506 1 /* $Id: winexe.cpp,v 1. 8 1999-07-07 08:11:10sandervl Exp $ */1 /* $Id: winexe.cpp,v 1.9 1999-08-16 13:54:32 sandervl Exp $ */ 2 2 3 3 /* … … 34 34 Win32Exe *WinExe = NULL; 35 35 36 //****************************************************************************** 37 //Called by ring 3 pe loader to create win32 executable 38 //****************************************************************************** 39 Win32Exe* WIN32API CreateWin32Exe(char *szFileName) 40 { 41 return new Win32Exe(szFileName); 42 } 36 43 //****************************************************************************** 37 44 //****************************************************************************** -
trunk/src/peldr/makefile
r458 r506 1 # $Id: makefile,v 1. 4 1999-08-09 21:03:19 phallerExp $1 # $Id: makefile,v 1.5 1999-08-16 13:54:06 sandervl Exp $ 2 2 3 3 # … … 17 17 CFLAGS = $(CFLAGS) -Ge+ /Gd- -I$(PDWIN32_INCLUDE) 18 18 CXXFLAGS = $(CXXFLAGS) -Ge+ /Gd- -I$(PDWIN32_INCLUDE) 19 LDFLAGS = $(LDFLAGS) -Ge+ /B"/pmtype:pm /stack:0x30000 /NOBASE /Map" \20 ..\..\lib\kernel32.lib os2386.lib ..\..\lib\odincrt.lib cppom30.lib19 LDFLAGSEXE = $(LDFLAGS) -Ge+ /B"/pmtype:pm /stack:0x30000 /NOBASE /Map" \ 20 $(PDWIN32_LIB)\peldr.lib os2386.lib $(PDWIN32_LIB)\odincrt.lib cppom30.lib 21 21 22 22 TARGET = pe 23 TARGETDLL = peldr 23 24 24 25 OBJS = pe.obj 26 OBJSDLL = initterm.obj 25 27 26 all: $(TARGET ).exe28 all: $(TARGETDLL).dll $(TARGETDLL).lib $(TARGET).exe 27 29 28 30 29 31 $(TARGET).exe: $(OBJS) 30 $(LD) $(LDFLAGS ) -Fe$@ $(OBJS)32 $(LD) $(LDFLAGSEXE) -Fe$@ $(OBJS) 31 33 $(CP) $(TARGET).exe $(PDWIN32_BIN) 32 34 35 $(TARGETDLL).dll: $(OBJSDLL) $(TARGETDLL).def 36 $(LD) $(LDFLAGS) -Fe$@ $(OBJSDLL) sbsstub.obj $(TARGETDLL).def OS2386.LIB CPPOM30.LIB 37 $(CP) $@ $(PDWIN32_BIN) 38 39 $(TARGETDLL).lib: $(TARGETDLL).dll 40 $(IMPLIB) $(IMPLIBFLAGS) $@ $(TARGETDLL).dll 41 $(CP) $@ $(PDWIN32_LIB) 33 42 34 43 44 initterm.obj: initterm.cpp 35 45 misc.obj: misc.cpp 36 46 pe.obj: pe.cpp pe.h $(PDWIN32_INCLUDE)\winimage.h $(PDWIN32_INCLUDE)\winexe.h … … 39 49 $(RM) *.obj *.lib *.dll *~ *.map *.pch *.exe 40 50 $(RM) $(PDWIN32_BIN)\$(TARGET).exe 51 $(RM) $(PDWIN32_BIN)\$(TARGETDLL).dll 52 $(RM) $(PDWIN32_LIB)\$(TARGETDLL).lib -
trunk/src/peldr/pe.cpp
r131 r506 1 /* $Id: pe.cpp,v 1. 4 1999-06-20 14:02:13sandervl Exp $ */1 /* $Id: pe.cpp,v 1.5 1999-08-16 13:54:07 sandervl Exp $ */ 2 2 3 /*4 *5 * Project Odin Software License can be found in LICENSE.TXT6 *7 */8 3 /* 9 4 * PELDR main exe loader code 10 5 * 11 6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl) 7 * 8 * 9 * Project Odin Software License can be found in LICENSE.TXT 12 10 * 13 11 */ … … 16 14 #define INCL_DOSPROCESS /* DOS Process values */ 17 15 #define INCL_DOSMISC /* DOS Miscellanous values */ 16 #define INCL_DOSMODULEMGR 18 17 #define INCL_WIN 19 #include <os2wrap.h> //Odin32 OS/2 api wrappers 18 #include <os2.h> 19 #include <bseord.h> 20 20 #include <stdio.h> 21 21 #include <string.h> … … 28 28 #include <windll.h> 29 29 #include <wprocess.h> 30 #include "pe.h" 30 31 31 32 char INFO_BANNER[] = "Usage: PE winexe commandline"; … … 40 41 char fullpath[CCHMAXPATH]; 41 42 42 void UpCase(char *mixedcase); 43 typedef HAB (* APIENTRY WININITIALIZEPROC)(ULONG flOptions); 44 typedef BOOL (* APIENTRY WINTERMINATEPROC)(HAB hab); 45 typedef HMQ (* APIENTRY WINCREATEMSGQUEUEPROC) (HAB hab, LONG cmsg); 46 typedef BOOL (* APIENTRY WINDESTROYMSGQUEUEPROC) (HMQ hmq); 47 typedef ULONG (* APIENTRY WINMESSAGEBOXPROC) (HWND hwndParent, 48 HWND hwndOwner, 49 PCSZ pszText, 50 PCSZ pszCaption, 51 ULONG idWindow, 52 ULONG flStyle); 53 54 WININITIALIZEPROC MyWinInitialize = 0; 55 WINTERMINATEPROC MyWinTerminate = 0; 56 WINCREATEMSGQUEUEPROC MyWinCreateMsgQueue = 0; 57 WINDESTROYMSGQUEUEPROC MyWinDestroyMsgQueue = 0; 58 WINMESSAGEBOXPROC MyWinMessageBox = 0; 59 60 WIN32CTOR CreateWin32Exe = 0; 43 61 44 62 int main(int argc, char *argv[]) … … 51 69 PTIB ptib; 52 70 Win32Exe *WinExe; 53 APIRET rc; 71 APIRET rc; 72 HMODULE hmodPMWin, hmodKernel32; 54 73 55 if ((hab = WinInitialize(0)) == 0L) /* Initialize PM */ 56 return(1); 74 printf("memory allocated at %X\n", ReserveMem()); 57 75 58 hmq = WinCreateMsgQueue(hab, 0); 76 rc = DosLoadModule(exeName, sizeof(exeName), "PMWIN.DLL", &hmodPMWin); 77 rc = DosQueryProcAddr(hmodPMWin, ORD_WIN32INITIALIZE, NULL, (PFN *)&MyWinInitialize); 78 rc = DosQueryProcAddr(hmodPMWin, ORD_WIN32TERMINATE, NULL, (PFN *)&MyWinTerminate); 79 rc = DosQueryProcAddr(hmodPMWin, ORD_WIN32CREATEMSGQUEUE, NULL, (PFN *)&MyWinCreateMsgQueue); 80 rc = DosQueryProcAddr(hmodPMWin, ORD_WIN32DESTROYMSGQUEUE, NULL, (PFN *)&MyWinDestroyMsgQueue); 81 rc = DosQueryProcAddr(hmodPMWin, ORD_WIN32MESSAGEBOX, NULL, (PFN *)&MyWinMessageBox); 59 82 83 rc = DosLoadModule(exeName, sizeof(exeName), "KERNEL32.DLL", &hmodKernel32); 84 rc = DosQueryProcAddr(hmodKernel32, 0, "CreateWin32Exe", (PFN *)&CreateWin32Exe); 85 86 if ((hab = MyWinInitialize(0)) == 0L) /* Initialize PM */ 87 return(1); 88 89 hmq = MyWinCreateMsgQueue(hab, 0); 90 60 91 if(argc < 2) { 61 WinMessageBox(HWND_DESKTOP, NULL, INFO_BANNER, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE);62 return(0);92 MyWinMessageBox(HWND_DESKTOP, NULL, INFO_BANNER, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE); 93 return(0); 63 94 } 64 95 65 96 strcpy(exeName, argv[1]); 66 UpCase(exeName);97 strupr(exeName); 67 98 if(strstr(exeName, ".EXE") == NULL) { 68 99 strcat(exeName, ".EXE"); 69 100 } 70 WinExe = newWin32Exe(exeName);101 WinExe = CreateWin32Exe(exeName); 71 102 if(WinExe == NULL) { 72 WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, szMemErrorMsg, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE);103 MyWinMessageBox(HWND_DESKTOP, HWND_DESKTOP, szMemErrorMsg, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE); 73 104 return(1); 74 105 } 75 106 rc = DosGetInfoBlocks(&ptib, &ppib); 76 107 if(rc) { 77 WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, szInteralErrorMsg, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE);108 MyWinMessageBox(HWND_DESKTOP, HWND_DESKTOP, szInteralErrorMsg, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE); 78 109 delete WinExe; 79 110 return(1); … … 107 138 delete WinExe; 108 139 109 if(hmq) WinDestroyMsgQueue( hmq ); /* Tidy up... */ 110 WinTerminate( hab ); /* Terminate the application */ 140 if(hmq) MyWinDestroyMsgQueue( hmq ); /* Tidy up... */ 141 MyWinTerminate( hab ); /* Terminate the application */ 142 143 DosFreeModule(hmodPMWin); 144 DosFreeModule(hmodKernel32); 111 145 return(0); 112 146 } 113 147 //****************************************************************************** 114 148 //****************************************************************************** 115 void UpCase(char *mixedcase)116 {117 int i;118 119 for(i=0;i<strlen(mixedcase);i++) {120 if(mixedcase[i] >= 'a' && mixedcase[i] <= 'z') {121 mixedcase[i] += 'A' - 'a';122 }123 }124 }125 //******************************************************************************126 //****************************************************************************** -
trunk/src/peldr/pe.h
r96 r506 1 /* $Id: pe.h,v 1. 3 1999-06-10 16:56:36 phallerExp $ */1 /* $Id: pe.h,v 1.4 1999-08-16 13:54:07 sandervl Exp $ */ 2 2 3 3 /* … … 23 23 extern char szInteralErrorMsg[]; 24 24 25 #define DWORD ULONG 26 #define LPVOID VOID * 27 #define WORD USHORT 28 #define UNALIGNED 29 #define PDWORD DWORD * 30 #define PWORD WORD * 31 #define NTAPI 32 #define BOOLEAN ULONG 33 #define WCHAR USHORT 34 #define HANDLE ULONG 35 36 #define WIN32API __stdcall 25 ULONG SYSTEM ReserveMem(); 37 26 38 27 #endif // NOIMAGE
Note:
See TracChangeset
for help on using the changeset viewer.
