Win32 fixes.

This commit is contained in:
castano 2008-10-17 18:37:17 +00:00
parent 6d8a75462a
commit 7776bd5c17

View File

@ -15,7 +15,7 @@
void * nvLoadLibrary(const char * name) void * nvLoadLibrary(const char * name)
{ {
#if NV_OS_WIN32 #if NV_OS_WIN32
return LoadLibraryExA( name, NULL, 0 ); return (void *)LoadLibraryExA( name, NULL, 0 );
#else #else
return dlopen(name, RTLD_LAZY); return dlopen(name, RTLD_LAZY);
#endif #endif
@ -25,7 +25,7 @@ void nvUnloadLibrary(void * handle)
{ {
nvDebugCheck(handle != NULL); nvDebugCheck(handle != NULL);
#if NV_OS_WIN32 #if NV_OS_WIN32
FreeLibrary(handle); FreeLibrary((HMODULE)handle);
#else #else
dlclose(handle); dlclose(handle);
#endif #endif
@ -34,7 +34,7 @@ void nvUnloadLibrary(void * handle)
void * nvBindSymbol(void * handle, const char * symbol) void * nvBindSymbol(void * handle, const char * symbol)
{ {
#if NV_OS_WIN32 #if NV_OS_WIN32
return (void *)GetProcAddressA(handle, symbol); return (void *)GetProcAddress((HMODULE)handle, symbol);
#else #else
return (void *)dlsym(handle, symbol); return (void *)dlsym(handle, symbol);
#endif #endif