Changeset 3384 in kBuild for trunk/src/kWorker/kWorker.c
- Timestamp:
- Jun 17, 2020 8:22:04 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kWorker/kWorker.c
r3378 r3384 2476 2476 } 2477 2477 else 2478 { 2478 2479 KWLDR_LOG(("kwLdrModuleTryLoadVirtualDll: %s -> %s - A real DLL!\n", pszName, pMod->pszPath)); 2480 /* HACK ALERT! If api-ms-win-crt-* find ucrtbase.dll and attach it as the 2481 real module as we cannot make replacements in the virtual 2482 API set forward DLLs. */ 2483 /** @todo Find a way of scanning the exports and collect forwarder DLLs and 2484 * imported DLLs. kLdrModEnumSymbols()? */ 2485 if ( pMod->pVirtualApiMod == NULL 2486 && kHlpStrNICompAscii(pszName, TUPLE("api-ms-win-crt-")) == 0) 2487 { 2488 HMODULE hModReal = GetModuleHandleW(L"ucrtbase.dll"); 2489 if (hModReal) 2490 { 2491 PKWMODULE pRealMod = kwLdrModuleForLoadedNativeByHandle(hModReal, K_TRUE /*fEnsureCrtSlot*/, "ucrtbase.dll"); 2492 if (pRealMod) 2493 { 2494 KWLDR_LOG(("kwLdrModuleTryLoadVirtualDll: Linking %s to '%s'.\n", pszName, pRealMod->pszPath)); 2495 pMod->pVirtualApiMod = pRealMod; 2496 } 2497 else 2498 KWLDR_LOG(("kwLdrModuleTryLoadVirtualDll: kwLdrModuleForLoadedNativeByHandle failed for ucrtbase.dll/%s!\n", pszName)); 2499 } 2500 else 2501 KWLDR_LOG(("kwLdrModuleTryLoadVirtualDll: no ucrtbase.dll found for %s!\n", pszName)); 2502 } 2503 } 2479 2504 } 2480 2505
Note:
See TracChangeset
for help on using the changeset viewer.