mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-23 00:28:11 +00:00
Replaced dynloader macros with real functions
This commit is contained in:
parent
743dba56db
commit
1534f2c067
@ -15,18 +15,18 @@
|
|||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
#endif // _POSIX
|
#endif // _POSIX
|
||||||
|
|
||||||
#if defined (_WIN)
|
#ifdef _WIN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif // _WIN
|
#endif
|
||||||
|
|
||||||
#if defined (_WIN)
|
#ifdef _WIN
|
||||||
#define hc_dlopen LoadLibrary
|
HMODULE hc_dlopen (LPCSTR lpLibFileName);
|
||||||
#define hc_dlclose FreeLibrary
|
BOOL hc_dlclose (HMODULE hLibModule);
|
||||||
#define hc_dlsym GetProcAddress
|
FARPROC hc_dlsym (HMODULE hModule, LPCSTR lpProcName);
|
||||||
#else
|
#else
|
||||||
#define hc_dlopen dlopen
|
void *hc_dlopen (const char *fileName, int flag);
|
||||||
#define hc_dlclose dlclose
|
int hc_dlclose (void *handle);
|
||||||
#define hc_dlsym dlsym
|
void *hc_dlsym (void *module, const char *symbol);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HC_LOAD_FUNC2(ptr,name,type,var,libname,noerr) \
|
#define HC_LOAD_FUNC2(ptr,name,type,var,libname,noerr) \
|
||||||
|
@ -5,3 +5,39 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "dynloader.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
|
||||||
|
Loading…
Reference in New Issue
Block a user