Commit 0f360eef authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

win32: Don't load DLL from CWD

parent cef6d735
......@@ -38,5 +38,15 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo)
int main( int argc, char **argv )
{
HINSTANCE h_Kernel32 = LoadLibraryW( L"kernel32.dll" );
if( h_Kernel32 )
{
BOOL (WINAPI * mySetDllDirectoryA)(const char* lpPathName);
/* Do NOT load any library from cwd. */
mySetDllDirectoryA = (BOOL WINAPI (*)(const char*)) GetProcAddress( h_Kernel32, "SetDllDirectoryA" );
if ( mySetDllDirectoryA )
mySetDllDirectoryA( "" );
FreeLibrary( h_kernel32 );
}
return VLMCmain( argc, argv );
}
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