Changeset 8877 for trunk/src/kernel32/winimagepeldr.cpp
- Timestamp:
- Jul 15, 2002, 4:28:53 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winimagepeldr.cpp
r7811 r8877 1 /* $Id: winimagepeldr.cpp,v 1.9 5 2002-02-06 16:33:39sandervl Exp $ */1 /* $Id: winimagepeldr.cpp,v 1.96 2002-07-15 14:28:53 sandervl Exp $ */ 2 2 3 3 /* … … 53 53 #include <win\virtual.h> 54 54 #include "oslibdos.h" 55 #include "oslibmem.h" 55 56 #include "mmap.h" 56 57 #include <wprocess.h> … … 159 160 160 161 if(realBaseAddress) 161 DosFreeMem((PVOID)realBaseAddress);162 OSLibDosFreeMem((PVOID)realBaseAddress); 162 163 163 164 if(nameexports) … … 924 925 return allocFixedMem(reservedMem); 925 926 } 926 rc = DosAllocMem((PPVOID)&baseAddress, imageSize, PAG_READ | PAG_WRITE | flAllocMem);927 rc = OSLibDosAllocMem((PPVOID)&baseAddress, imageSize, PAG_READ | PAG_WRITE); 927 928 if(rc) { 928 929 dprintf((LOG, "Win32PeLdrImage::allocSections, DosAllocMem returned %d", rc)); … … 1011 1012 } 1012 1013 while(TRUE) { 1013 rc = DosAllocMem((PPVOID)&address, FALLOC_SIZE, PAG_READ | allocFlags);1014 rc = OSLibDosAllocMem((PPVOID)&address, FALLOC_SIZE, PAG_READ | allocFlags); 1014 1015 if(rc) break; 1015 1016 … … 1017 1018 if(address + FALLOC_SIZE >= oh.ImageBase) { 1018 1019 if(address > oh.ImageBase) {//we've passed it! 1019 DosFreeMem((PVOID)address);1020 OSLibDosFreeMem((PVOID)address); 1020 1021 break; 1021 1022 } 1022 1023 //found the right address 1023 DosFreeMem((PVOID)address);1024 OSLibDosFreeMem((PVOID)address); 1024 1025 1025 1026 diff = oh.ImageBase - address; 1026 1027 if(diff) { 1027 rc = DosAllocMem((PPVOID)&address, diff, PAG_READ | allocFlags);1028 rc = OSLibDosAllocMem((PPVOID)&address, diff, PAG_READ | allocFlags); 1028 1029 if(rc) break; 1029 1030 } 1030 rc = DosAllocMem((PPVOID)&baseAddress, imageSize, PAG_READ | PAG_WRITE | allocFlags);1031 rc = OSLibDosAllocMem((PPVOID)&baseAddress, imageSize, PAG_READ | PAG_WRITE | allocFlags); 1031 1032 if(rc) break; 1032 1033 1033 if(diff) DosFreeMem((PVOID)address);1034 if(diff) OSLibDosFreeMem((PVOID)address); 1034 1035 1035 1036 realBaseAddress = baseAddress; … … 1039 1040 } 1040 1041 for(i=0;i<alloccnt;i++) { 1041 DosFreeMem((PVOID)memallocs[i]);1042 OSLibDosFreeMem((PVOID)memallocs[i]); 1042 1043 } 1043 1044 free(memallocs);
Note:
See TracChangeset
for help on using the changeset viewer.