| 260 | } |
| 261 | |
| 262 | HMODULE WINAPI LoadLibraryExW_intercept(LPCWSTR fileName, HANDLE hFile, DWORD dwFlags) |
| 263 | { |
| 264 | // We have to call the loader lock (if it is available) so that we don't get deadlocks |
| 265 | // in the case where Dll initialization acquires the loader lock and calls LoadLibrary |
| 266 | // while another thread is inside PostLoadLibrary. |
| 267 | HMODULE hModule = LoadLibraryExW_dll(fileName, hFile, dwFlags); |
| 268 | |
| 269 | if (hModule != nullptr) |
| 270 | { |
| 271 | PostLoadLibrary(hModule); |
| 272 | } |
| 273 | return hModule; |
| 274 | } |
| 275 | |
| 276 | void HookLoadLibrary() |
| 277 | { |
nothing calls this directly
no test coverage detected