- Timestamp:
- Jan 11, 2004, 12:59:04 PM (22 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.DEF
r10377 r10378 1 ; $Id: KERNEL32.DEF,v 1.1 59 2004-01-11 11:57:50sandervl Exp $1 ; $Id: KERNEL32.DEF,v 1.160 2004-01-11 11:59:02 sandervl Exp $ 2 2 3 3 ;Basis is Windows95 KERNEL32 … … 1094 1094 __dt__6VMutexFv @1207 NONAME 1095 1095 1096 ;Get version resource1097 GetVersionStruct = GetVersionStruct @1221 NONAME1098 GetVersionSize = GetVersionSize @1222 NONAME1099 1100 1096 ;version functions 1101 1097 CheckVersionFromHMOD = CheckVersionFromHMOD @1223 NONAME -
trunk/src/kernel32/kernel32dbg.def
r10377 r10378 1 ; $Id: kernel32dbg.def,v 1.3 4 2004-01-11 11:57:52sandervl Exp $1 ; $Id: kernel32dbg.def,v 1.35 2004-01-11 11:59:03 sandervl Exp $ 2 2 3 3 ;Basis is Windows95 KERNEL32 … … 1094 1094 __dt__6VMutexFv @1207 NONAME 1095 1095 1096 ;Get version resource1097 GetVersionStruct = GetVersionStruct @1221 NONAME1098 GetVersionSize = GetVersionSize @1222 NONAME1099 1100 1096 ;version functions 1101 1097 CheckVersionFromHMOD = CheckVersionFromHMOD @1223 NONAME -
trunk/src/kernel32/wprocess.cpp
r10048 r10378 1 /* $Id: wprocess.cpp,v 1.18 8 2003-04-29 10:27:18sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.189 2004-01-11 11:59:04 sandervl Exp $ */ 2 2 3 3 /* … … 2452 2452 } 2453 2453 //****************************************************************************** 2454 //Retrieve the version2455 //******************************************************************************2456 BOOL SYSTEM GetVersionStruct(char *lpszModName, char *verstruct, ULONG bufLength)2457 {2458 Win32ImageBase *winimage;2459 HINSTANCE hDll;2460 BOOL rc = FALSE;2461 2462 dprintf(("GetVersionStruct of module %s %x %d", lpszModName, verstruct, bufLength));2463 if(verstruct == NULL) {2464 SetLastError(ERROR_INVALID_PARAMETER);2465 return FALSE;2466 }2467 if (WinExe != NULL && WinExe->matchModName(lpszModName)) {2468 return WinExe->getVersionStruct(verstruct, bufLength);2469 }2470 hDll = LoadLibraryExA(lpszModName, 0, LOAD_LIBRARY_AS_DATAFILE);2471 if(hDll == 0) {2472 dprintf(("ERROR: GetVersionStruct: Unable to load module!!"));2473 return 0;2474 }2475 winimage = (Win32ImageBase *)Win32DllBase::findModule(hDll);2476 if(winimage != NULL) {2477 rc = winimage->getVersionStruct(verstruct, bufLength);2478 }2479 else {2480 dprintf(("GetVersionStruct; just loaded dll %s, but can't find it now!", lpszModName));2481 //// DebugInt3();2482 }2483 FreeLibrary(hDll);2484 return rc;2485 }2486 //******************************************************************************2487 //******************************************************************************2488 ULONG SYSTEM GetVersionSize(char *lpszModName)2489 {2490 Win32ImageBase *winimage;2491 HINSTANCE hDll;2492 ULONG size = 0;2493 2494 dprintf(("GetVersionSize of %s", lpszModName));2495 if (WinExe != NULL && WinExe->matchModName(lpszModName)) {2496 return WinExe->getVersionSize();2497 }2498 2499 hDll = LoadLibraryExA(lpszModName, 0, LOAD_LIBRARY_AS_DATAFILE);2500 if(hDll == 0) {2501 dprintf(("ERROR: GetVersionStruct: Unable to load module!!"));2502 return 0;2503 }2504 winimage = (Win32ImageBase *)Win32DllBase::findModule(hDll);2505 if(winimage != NULL) {2506 size = winimage->getVersionSize();2507 }2508 else {2509 dprintf(("GetVersionSize; just loaded dll %s, but can't find it now!", lpszModName));2510 //// DebugInt3();2511 }2512 FreeLibrary(hDll);2513 return size;2514 }2515 //******************************************************************************2516 2454 //****************************************************************************** 2517 2455 BOOL WIN32API DisableThreadLibraryCalls(HMODULE hModule)
Note:
See TracChangeset
for help on using the changeset viewer.