Let dlfcn.h return a function pointer on Windows
This commit is contained in:
@@ -42,7 +42,11 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef int (__stdcall *DLSYM_RET_TYPE)();
|
||||
#else
|
||||
#define DLSYM_RET_TYPE void *
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
@@ -91,6 +91,6 @@ dlsym(void * vhm, const char * func_name)
|
||||
{
|
||||
HMODULE hm = (HMODULE) vhm;
|
||||
|
||||
return GetProcAddress(hm, func_name);
|
||||
return (DLSYM_RET_TYPE)(ULONG_PTR)GetProcAddress(hm, func_name);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user