Changeset 8012 for trunk/src/kernel32/resource.cpp
- Timestamp:
- Feb 25, 2002, 1:02:35 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/resource.cpp
r4224 r8012 1 /* $Id: resource.cpp,v 1.1 7 2000-09-08 18:07:50sandervl Exp $ */1 /* $Id: resource.cpp,v 1.18 2002-02-25 12:02:17 sandervl Exp $ */ 2 2 3 3 /* … … 16 16 #include <winexebase.h> 17 17 #include <windllbase.h> 18 #include <custombuild.h> 18 19 19 20 #define DBG_LOCALLOG DBG_resource 20 21 #include "dbglocal.h" 21 22 23 24 static PFNFINDRESOURCEEXA pfnCustomFindResourceA = NULL; 25 static PFNFINDRESOURCEEXW pfnCustomFindResourceW = NULL; 26 27 //****************************************************************************** 28 //Called by custom Odin builds to hook FindReource(Ex)A/W calls 29 //****************************************************************************** 30 BOOL WIN32API SetCustomFindResource(PFNFINDRESOURCEEXA pfnFindResourceA, PFNFINDRESOURCEEXW pfnFindResourceW) 31 { 32 pfnCustomFindResourceA = pfnFindResourceA; 33 pfnCustomFindResourceW = pfnFindResourceW; 34 return TRUE; 35 } 22 36 //****************************************************************************** 23 37 //lpszName = integer id (high word 0), else string (name or "#237") … … 27 41 { 28 42 Win32ImageBase *module; 29 43 WORD wLanguage = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL); 44 45 if(pfnCustomFindResourceA) { 46 pfnCustomFindResourceA(&hModule, (LPSTR *)&lpszName, (LPSTR *)&lpszType, &wLanguage); 47 } 30 48 module = Win32ImageBase::findModule(hModule); 31 49 if(module == NULL) { … … 33 51 return(NULL); 34 52 } 35 return module->findResourceA(lpszName, (LPSTR)lpszType );53 return module->findResourceA(lpszName, (LPSTR)lpszType, wLanguage); 36 54 } 37 55 //****************************************************************************** 38 56 //****************************************************************************** 39 57 HRSRC WIN32API FindResourceW(HINSTANCE hModule, LPCWSTR lpszName, 40 LPCWSTR lpszType)58 LPCWSTR lpszType) 41 59 { 42 60 Win32ImageBase *module; 43 61 WORD wLanguage = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL); 62 63 if(pfnCustomFindResourceW) { 64 pfnCustomFindResourceW(&hModule, (LPWSTR *)&lpszName, (LPWSTR *)&lpszType, &wLanguage); 65 } 44 66 module = Win32ImageBase::findModule(hModule); 45 67 if(module == NULL) { … … 47 69 return(NULL); 48 70 } 49 50 return module->findResourceW((LPWSTR)lpszName, (LPWSTR)lpszType); 71 return module->findResourceW((LPWSTR)lpszName, (LPWSTR)lpszType, wLanguage); 51 72 } 52 73 /***************************************************************************** … … 65 86 * If the function fails, the return value is NULL 66 87 * Remark : 67 * Status : UNTESTED STUB88 * Status : fully implemented 68 89 * 69 90 * Author : SvL … … 74 95 { 75 96 Win32ImageBase *module; 97 98 if(pfnCustomFindResourceA) { 99 pfnCustomFindResourceA(&hModule, (LPSTR *)&lpName, (LPSTR *)&lpType, &wLanguage); 100 } 76 101 77 102 module = Win32ImageBase::findModule(hModule); … … 99 124 * If the function fails, the return value is NULL 100 125 * Remark : 101 * Status : UNTESTED STUB126 * Status : fully implemented 102 127 * 103 128 * Author : SvL 104 129 *****************************************************************************/ 105 130 106 HRSRC WIN32API FindResourceExW(HMODULE hModule, 107 LPCWSTR lpType, 108 LPCWSTR lpName, 109 WORD wLanguage) 131 HRSRC WIN32API FindResourceExW(HMODULE hModule, LPCWSTR lpType, 132 LPCWSTR lpName, WORD wLanguage) 110 133 { 111 134 Win32ImageBase *module; 135 136 if(pfnCustomFindResourceW) { 137 pfnCustomFindResourceW(&hModule, (LPWSTR *)&lpName, (LPWSTR *)&lpType, &wLanguage); 138 } 112 139 113 140 module = Win32ImageBase::findModule(hModule); … … 186 213 * @param lpEnumFunc pointer to callback function 187 214 * @param lParam application-defined parameter 188 * @status stub215 * @status fully implemented 189 216 * @author knut st. osmundsen 190 217 * @remark The EnumResourceNames function continues to enumerate resource … … 225 252 * @param lpEnumFunc pointer to callback function 226 253 * @param lParam application-defined parameter 227 * @status stub254 * @status fully implemented 228 255 * @author knut st. osmundsen 229 256 * @remark The EnumResourceNames function continues to enumerate resource … … 267 294 * resource languages until the callback function returns FALSE 268 295 * or all resource languages have been enumerated. 269 * Status : UNTESTED STUB296 * Status : fully implemented 270 297 * 271 298 * Author : Markus Montkowski [Tha, 1998/05/21 17:46] … … 308 335 * resource languages until the callback function returns FALSE 309 336 * or all resource languages have been enumerated. 310 * Status : UNTESTED STUB337 * Status : fully implemented 311 338 * 312 339 * Author : Markus Montkowski [Tha, 1998/05/21 17:46] … … 344 371 * If the function fails, the return value is zero 345 372 * Remark : 346 * Status : UNTESTED STUB373 * Status : fully implemented 347 374 * 348 375 * Author : Markus Montkowski [Tha, 1998/05/21 17:46] … … 379 406 * If the function fails, the return value is zero 380 407 * Remark : 381 * Status : UNTESTED STUB408 * Status : fully implemented 382 409 * 383 410 * Author : Markus Montkowski [Tha, 1998/05/21 17:46] … … 401 428 return pModule->enumResourceTypesW(hModule, lpEnumFunc, lParam); 402 429 } 430 //****************************************************************************** 431 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.