MCPcopy Create free account
hub / github.com/LibreVR/Revive / HookLoadLibraryExW

Function HookLoadLibraryExW

Revive/main.cpp:52–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52HMODULE WINAPI HookLoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
53{
54 LPCWSTR name = PathFindFileNameW(lpLibFileName);
55 LPCWSTR ext = PathFindExtensionW(name);
56 size_t length = ext - name;
57
58 // Load our own library again so the ref count is incremented.
59 if (wcsncmp(name, ovrModuleName, length) == 0)
60 return TrueLoadLibraryExW(revModuleName, hFile, dwFlags);
61
62 return TrueLoadLibraryExW(lpLibFileName, hFile, dwFlags);
63}
64
65void AttachDetours()
66{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected