| 50 | } |
| 51 | |
| 52 | HMODULE 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 | |
| 65 | void AttachDetours() |
| 66 | { |
nothing calls this directly
no outgoing calls
no test coverage detected