Fix calling convention of LoadLibrary hooks which caused x86 builds to crash

This commit is contained in:
Cameron Gutman 2018-10-15 07:41:50 -07:00
parent 8a7c463c52
commit 49ac431792

View file

@ -84,7 +84,7 @@ private:
return false;
}
static HMODULE LoadLibraryAHook(LPCSTR lpLibFileName)
static HMODULE WINAPI LoadLibraryAHook(LPCSTR lpLibFileName)
{
if (lpLibFileName && isImageBlacklistedA(lpLibFileName)) {
SetLastError(ERROR_ACCESS_DISABLED_BY_POLICY);
@ -94,7 +94,7 @@ private:
return s_RealLoadLibraryA(lpLibFileName);
}
static HMODULE LoadLibraryWHook(LPCWSTR lpLibFileName)
static HMODULE WINAPI LoadLibraryWHook(LPCWSTR lpLibFileName)
{
if (lpLibFileName && isImageBlacklistedW(lpLibFileName)) {
SetLastError(ERROR_ACCESS_DISABLED_BY_POLICY);
@ -104,7 +104,7 @@ private:
return s_RealLoadLibraryW(lpLibFileName);
}
static HMODULE LoadLibraryExAHook(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
static HMODULE WINAPI LoadLibraryExAHook(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
{
if (lpLibFileName && isImageBlacklistedA(lpLibFileName)) {
SetLastError(ERROR_ACCESS_DISABLED_BY_POLICY);
@ -114,7 +114,7 @@ private:
return s_RealLoadLibraryExA(lpLibFileName, hFile, dwFlags);
}
static HMODULE LoadLibraryExWHook(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
static HMODULE WINAPI LoadLibraryExWHook(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
{
if (lpLibFileName && isImageBlacklistedW(lpLibFileName)) {
SetLastError(ERROR_ACCESS_DISABLED_BY_POLICY);