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

Function HookLoadLibraryExW

LibOVRProxy/main.cpp:29–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29HMODULE WINAPI HookLoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
30{
31 LPCWSTR name = PathFindFileNameW(lpLibFileName);
32 LPCWSTR ext = PathFindExtensionW(name);
33 size_t length = ext - name;
34
35 // Load our own library again so the ref count is incremented.
36 if (wcsncmp(name, ovrModuleName, length) == 0)
37 return TrueLoadLibraryExW(revModuleName, hFile, dwFlags);
38
39 return TrueLoadLibraryExW(lpLibFileName, hFile, dwFlags);
40}
41
42void AttachDetours()
43{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected