-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renaming Support for luvi.exe as a lib for build libraries
- Loading branch information
1 parent
992b5ef
commit aa50ae1
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "windows.h" | ||
#include "delayimp.h" | ||
FARPROC WINAPI LoadFailureHook(unsigned dliNotify, PDelayLoadInfo pdli); | ||
extern PfnDliHook __pfnDliFailureHook2 = LoadFailureHook; | ||
|
||
|
||
FARPROC WINAPI LoadFailureHook(unsigned dliNotify, PDelayLoadInfo pdli) | ||
{ | ||
if (dliNotify == dliFailLoadLib) { | ||
if (_stricmp("luvi.exe", pdli->szDll) == 0) { | ||
TCHAR name[MAX_PATH + 1]; | ||
DWORD ret = GetModuleFileName(NULL, name, MAX_PATH + 1); | ||
if (ret > 0) { | ||
HMODULE module = LoadLibrary(name); | ||
if (module) { | ||
return (FARPROC)module; | ||
} | ||
} | ||
} | ||
} | ||
return 0; | ||
} | ||
|