1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-15 20:39:17 +00:00
hashcat/src/dynloader.c

44 lines
646 B
C
Raw Normal View History

2016-09-11 09:42:19 +00:00
/**
* Author......: See docs/credits.txt
2016-09-11 09:42:19 +00:00
* License.....: MIT
*/
#include "common.h"
#include "dynloader.h"
#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