| 27 | } |
| 28 | |
| 29 | HMODULE 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 | |
| 42 | void AttachDetours() |
| 43 | { |
nothing calls this directly
no outgoing calls
no test coverage detected