| 40 | } |
| 41 | |
| 42 | HMODULE 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 | |
| 55 | void AttachDetours() |
| 56 | { |
nothing calls this directly
no outgoing calls
no test coverage detected