MCPcopy Create free account
hub / github.com/apitrace/apitrace / MyLoadLibraryExA

Function MyLoadLibraryExA

inject/injectee_mhook.cpp:549–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549static HMODULE WINAPI
550MyLoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
551{
552 HMODULE hModule = RealLoadLibraryExA(lpLibFileName, hFile, adjustFlags(dwFlags));
553 DWORD dwLastError = GetLastError();
554
555 if (VERBOSITY >= 2) {
556 debugPrintf("inject: intercepting %s(\"%s\", 0x%p, 0x%lx) = 0x%p\n",
557 __FUNCTION__ + 2, lpLibFileName, hFile, dwFlags, hModule);
558 }
559
560 // Hook all new modules (and not just this one, to pick up any dependencies)
561 patchAllModules(ACTION_HOOK);
562
563 SetLastError(dwLastError);
564 return hModule;
565}
566
567static HMODULE WINAPI
568MyLoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)

Callers

nothing calls this directly

Calls 3

adjustFlagsFunction · 0.70
debugPrintfFunction · 0.70
patchAllModulesFunction · 0.70

Tested by

no test coverage detected