diff options
author | 2016-11-18 17:06:56 -0500 | |
---|---|---|
committer | 2016-11-20 13:41:47 -0500 | |
commit | 7e327d5d4ebf14ccabd09a15e4b1cf6a34c2b632 (patch) | |
tree | 5b56289a4846e98482d2e29b861853932e9eb064 /src/osd/uwp/uwpcompat.cpp | |
parent | fcb9f8f5488378633c9d8bbb71cf362ebf0aa052 (diff) |
Remove LoadLibrary hack from UWP (nw)
Diffstat (limited to 'src/osd/uwp/uwpcompat.cpp')
-rw-r--r-- | src/osd/uwp/uwpcompat.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/osd/uwp/uwpcompat.cpp b/src/osd/uwp/uwpcompat.cpp index b8f585b4e5b..ef0e07cf081 100644 --- a/src/osd/uwp/uwpcompat.cpp +++ b/src/osd/uwp/uwpcompat.cpp @@ -66,16 +66,14 @@ extern "C" { return osd_ticks(); } + // This is only in here so callers get an error HMODULE WINAPI LoadLibraryExA( _In_ LPCSTR lpLibFileName, _Reserved_ HANDLE hFile, _In_ DWORD dwFlags - ) + ) { - wchar_t libfile_wide[MAX_PATH + 1]; - if (MultiByteToWideChar(CP_ACP, 0, lpLibFileName, strlen(lpLibFileName), libfile_wide, MAX_PATH)) - return LoadPackagedLibrary(libfile_wide, 0); - + SetLastError(ERROR_FILE_NOT_FOUND); return nullptr; } @@ -83,9 +81,10 @@ extern "C" { _In_ LPCWSTR lpLibFileName, _Reserved_ HANDLE hFile, _In_ DWORD dwFlags - ) + ) { - return LoadPackagedLibrary(lpLibFileName, 0); + SetLastError(ERROR_FILE_NOT_FOUND); + return nullptr; } DWORD WINAPI GetFileSize( |