Commit 11400bc5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vlc: do not load kernel32.dll

vlc.exe already depends on kernel32.dll, so there is no need to load it
explicitly. It can simply be looked up.
parent 5d9004a6
......@@ -102,8 +102,8 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
/* SetProcessDEPPolicy */
HINSTANCE h_Kernel32 = LoadLibraryW(L"kernel32.dll");
if(h_Kernel32)
HINSTANCE h_Kernel32 = GetModuleHandle(TEXT("kernel32.dll"));
if (h_Kernel32 != NULL)
{
BOOL (WINAPI * mySetProcessDEPPolicy)( DWORD dwFlags);
BOOL (WINAPI * mySetDllDirectoryA)(const char* lpPathName);
......@@ -119,8 +119,6 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
GetProcAddress(h_Kernel32, "SetDllDirectoryA");
if(mySetDllDirectoryA)
mySetDllDirectoryA("");
FreeLibrary(h_Kernel32);
}
SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment