2016-09-11 09:42:19 +00:00
|
|
|
/**
|
2016-09-11 20:20:15 +00:00
|
|
|
* Author......: See docs/credits.txt
|
2016-09-11 09:42:19 +00:00
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include "dynloader.h"
|
2016-10-01 11:03:31 +00:00
|
|
|
|
|
|
|
#ifdef _WIN
|
|
|
|
|
|
|
|
HMODULE hc_dlopen (LPCSTR lpLibFileName)
|
|
|
|
{
|
|
|
|
return LoadLibraryA (lpLibFileName);
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL hc_dlclose (HMODULE hLibModule)
|
|
|
|
{
|
|
|
|
return FreeLibrary (hLibModule);
|
|
|
|
}
|
|
|
|
|
|
|
|
FARPROC hc_dlsym (HMODULE hModule, LPCSTR lpProcName)
|
|
|
|
{
|
|
|
|
return GetProcAddress (hModule, lpProcName);
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
void *hc_dlopen (const char *fileName, int flag)
|
|
|
|
{
|
|
|
|
return dlopen (fileName, flag);
|
|
|
|
}
|
|
|
|
|
|
|
|
int hc_dlclose (void * handle)
|
|
|
|
{
|
|
|
|
return dlclose (handle);
|
|
|
|
}
|
|
|
|
|
|
|
|
void *hc_dlsym (void *module, const char *symbol)
|
|
|
|
{
|
|
|
|
return dlsym (module, symbol);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|