- Timestamp:
- Aug 19, 1999, 2:53:19 PM (26 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/makefile
r510 r576 1 # $Id: makefile,v 1.1 8 1999-08-16 16:28:02sandervl Exp $1 # $Id: makefile,v 1.19 1999-08-19 12:53:18 sandervl Exp $ 2 2 3 3 # … … 343 343 344 344 pefile.OBJ: pefile.cpp $(PDWIN32_INCLUDE)\pefile.h 345 winimage.OBJ: winimage.cpp $(PDWIN32_INCLUDE)\winimage.h $(PDWIN32_INCLUDE)\windll.h $(PDWIN32_INCLUDE)\pefile.h 345 winimage.OBJ: winimage.cpp $(PDWIN32_INCLUDE)\winimage.h $(PDWIN32_INCLUDE)\windll.h $(PDWIN32_INCLUDE)\pefile.h $(PDWIN32_INCLUDE)\winres.h 346 346 winimgres.OBJ: winimgres.cpp $(PDWIN32_INCLUDE)\winimage.h $(PDWIN32_INCLUDE)\windll.h $(PDWIN32_INCLUDE)\pefile.h $(PDWIN32_INCLUDE)\winexe.h $(PDWIN32_INCLUDE)\winres.h 347 347 windll.OBJ: windll.cpp $(PDWIN32_INCLUDE)\winimage.h $(PDWIN32_INCLUDE)\windll.h -
trunk/src/kernel32/winimgres.cpp
r571 r576 1 /* $Id: winimgres.cpp,v 1. 8 1999-08-19 10:25:27sandervl Exp $ */1 /* $Id: winimgres.cpp,v 1.9 1999-08-19 12:53:18 sandervl Exp $ */ 2 2 3 3 /* … … 129 129 } 130 130 if(pData == NULL) { 131 dprintf(("getResource: res not found!\n"));132 return(NULL);131 dprintf(("getResource: res not found!\n")); 132 return(NULL); 133 133 } 134 134 135 135 char *resdata = (char *)((char *)pResDir + pData->OffsetToData - pResSection->virtaddr); 136 136 if(stringid != -1) {//search for string in table 137 USHORT *unicodestr = (USHORT *)resdata;138 139 for(i=0;i<stringid;i++) {140 unicodestr += *unicodestr;141 }142 res = new Win32Resource(this, id, NTRT_STRING, (ULONG)*unicodestr, (char *)unicodestr);143 if(res == NULL) {144 dprintf(("new Win32Resource failed!\n"));145 return(NULL);146 }137 USHORT *unicodestr = (USHORT *)resdata; 138 139 for(i=0;i<stringid;i++) { 140 unicodestr += *unicodestr; 141 } 142 res = new Win32Resource(this, id, NTRT_STRING, (ULONG)*unicodestr, (char *)unicodestr); 143 if(res == NULL) { 144 dprintf(("new Win32Resource failed!\n")); 145 return(NULL); 146 } 147 147 } 148 148 else res = new Win32Resource(this, id, type, pData->Size, resdata); -
trunk/src/kernel32/winres.cpp
r419 r576 1 /* $Id: winres.cpp,v 1. 6 1999-08-05 11:44:35sandervl Exp $ */1 /* $Id: winres.cpp,v 1.7 1999-08-19 12:53:19 sandervl Exp $ */ 2 2 3 3 /* … … 83 83 //****************************************************************************** 84 84 Win32Resource::Win32Resource(Win32Image *module, HRSRC hRes, ULONG id, ULONG type) : 85 os2resdata(NULL), winresdata(NULL) 85 os2resdata(NULL), winresdata(NULL), resType(RSRC_PE2LX) 86 86 { 87 87 APIRET rc; … … 139 139 Win32Resource::Win32Resource(Win32Image *module, ULONG id, ULONG type, 140 140 ULONG size, char *resdata) : hres(NULL), 141 os2resdata(NULL), winresdata(NULL) 141 os2resdata(NULL), winresdata(NULL), resType(RSRC_PELOADER) 142 142 { 143 143 next = module->winres; … … 162 162 Win32Resource *res = module->winres; 163 163 164 #if 0165 164 //returned by DosGetResource, so we don't (and mustn't) free it 166 if(os2resdata) free(os2resdata); 167 #endif 165 if(os2resdata && resType == RSRC_PELOADER) 166 free(os2resdata); 167 168 168 if(winresdata) free(winresdata); 169 169
Note:
See TracChangeset
for help on using the changeset viewer.