- Timestamp:
- Sep 23, 1999, 3:54:37 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winimgres.cpp
r978 r1015 1 /* $Id: winimgres.cpp,v 1.1 5 1999-09-18 17:47:10 sandervlExp $ */1 /* $Id: winimgres.cpp,v 1.16 1999-09-23 13:53:38 phaller Exp $ */ 2 2 3 3 /* … … 11 11 * TODO: Check created resource objects before loading the resource! 12 12 * TODO: Is the name id of the version resource always 1? 13 * TODO: Once the resource handling in PE2LX/win32k is changed, 13 * TODO: Once the resource handling in PE2LX/win32k is changed, 14 14 * getVersionStruct/Size can be moved into the Win32ImageBase class 15 15 * … … 36 36 //PE spec says names & ids are sorted; keep on searching just to be sure 37 37 //****************************************************************************** 38 PIMAGE_RESOURCE_DATA_ENTRY 38 PIMAGE_RESOURCE_DATA_ENTRY 39 39 Win32ImageBase::getPEResourceEntry(ULONG id, ULONG type, ULONG lang) 40 40 { … … 73 73 prdType = (PIMAGE_RESOURCE_DIRECTORY)((int)pResDir + (int)prde->u2.OffsetToData); 74 74 75 if(i < pResDir->NumberOfNamedEntries) 75 if(i < pResDir->NumberOfNamedEntries) 76 76 {//name or id entry? 77 77 //SvL: 30-10-'97, high bit is set, so clear to get real offset … … 82 82 lstrcpynWtoA(typename, pstring->NameString, pstring->Length+1); 83 83 typename[pstring->Length] = 0; 84 84 85 85 if(!fNumType) { 86 86 if(stricmp(typename, (char *)type) == 0) { … … 381 381 { 382 382 HRSRC hres; 383 char *astring1 = NULL, *astring2 = NULL; 384 385 if(HIWORD(lpszType) != 0) { 386 astring1 = UnicodeToAsciiString(lpszType); 387 } 388 else astring1 = (char *)lpszType; 389 390 if(HIWORD(lpszName) != 0) { 391 astring2 = UnicodeToAsciiString(lpszName); 392 } 393 else astring2 = (char *)lpszName; 383 char *astring1 = NULL, 384 *astring2 = NULL; 385 386 if(HIWORD(lpszType) != 0) astring1 = UnicodeToAsciiString(lpszType); 387 else astring1 = (char *)lpszType; 388 if(HIWORD(lpszName) != 0) astring2 = UnicodeToAsciiString(lpszName); 389 else astring2 = (char *)lpszName; 394 390 395 391 hres = (HRSRC) findResourceA(astring1, astring2); 396 if(astring1) FreeAsciiString(astring1); 397 if(astring2) FreeAsciiString(astring2); 392 393 /* do NOT free untranslated numerical Resource IDs */ 394 if(HIWORD(astring1)) FreeAsciiString(astring1); 395 if(HIWORD(astring2)) FreeAsciiString(astring2); 398 396 399 397 return(hres); … … 422 420 if(HIWORD(lpszType) != 0) { 423 421 char *resname = UnicodeToAsciiString(lpszType); 424 } 422 } 425 423 else astring1 = (char *)lpszType; 426 424
Note:
See TracChangeset
for help on using the changeset viewer.