Esempio n. 1
0
/*
=====================
Sys_DLL_Load
=====================
*/
uintptr_t Sys_DLL_Load( const char *dllName ) {
	HINSTANCE	libHandle;
	libHandle = LoadLibrary( dllName );
	if ( libHandle ) {
		// since we can't have LoadLibrary load only from the specified path, check it did the right thing
		char loadedPath[ MAX_OSPATH ];
		GetModuleFileName( libHandle, loadedPath, sizeof( loadedPath ) - 1 );
		if ( idStr::IcmpPath( dllName, loadedPath ) ) {
			Sys_Printf( "ERROR: LoadLibrary '%s' wants to load '%s'\n", dllName, loadedPath );
			Sys_DLL_Unload( (uintptr_t)libHandle );
			return 0;
		}
	}
	return (uintptr_t)libHandle;
}
Esempio n. 2
0
void idSysLocal::DLL_Unload( int dllHandle )
{
	Sys_DLL_Unload( dllHandle );
}
Esempio n. 3
0
void idSysLocal::DLL_Unload( uintptr_t dllHandle ) {
	Sys_DLL_Unload( dllHandle );
}