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

Function HookLoadLibraryExW

ReviveXR/main.cpp:42–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42HMODULE WINAPI HookLoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
43{
44 LPCWSTR name = PathFindFileNameW(lpLibFileName);
45 LPCWSTR ext = PathFindExtensionW(name);
46 size_t length = ext - name;
47
48 // Load our own library again so the ref count is incremented.
49 if (wcsncmp(name, ovrModuleName, length) == 0)
50 return TrueLoadLibraryExW(revModuleName, hFile, dwFlags);
51
52 return TrueLoadLibraryExW(lpLibFileName, hFile, dwFlags);
53}
54
55void AttachDetours()
56{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected