ETHER: Explicitly use GetModuleHandleA API when finding DLL entry points
This commit is contained in:
parent
e7dbc8ea64
commit
f5a1048101
1 changed files with 2 additions and 2 deletions
|
@ -1138,8 +1138,8 @@ int load_pcap(void) {
|
||||||
BOOL(WINAPI *p_SetDllDirectory)(LPCTSTR);
|
BOOL(WINAPI *p_SetDllDirectory)(LPCTSTR);
|
||||||
UINT(WINAPI *p_GetSystemDirectory)(LPTSTR lpBuffer, UINT uSize);
|
UINT(WINAPI *p_GetSystemDirectory)(LPTSTR lpBuffer, UINT uSize);
|
||||||
|
|
||||||
p_SetDllDirectory = (BOOL(WINAPI *)(LPCTSTR)) GetProcAddress(GetModuleHandle("kernel32.dll"), "SetDllDirectoryA");
|
p_SetDllDirectory = (BOOL(WINAPI *)(LPCTSTR)) GetProcAddress(GetModuleHandleA("kernel32.dll"), "SetDllDirectoryA");
|
||||||
p_GetSystemDirectory = (UINT(WINAPI *)(LPTSTR, UINT)) GetProcAddress(GetModuleHandle("kernel32.dll"), "GetSystemDirectoryA");
|
p_GetSystemDirectory = (UINT(WINAPI *)(LPTSTR, UINT)) GetProcAddress(GetModuleHandleA("kernel32.dll"), "GetSystemDirectoryA");
|
||||||
if (p_SetDllDirectory && p_GetSystemDirectory) {
|
if (p_SetDllDirectory && p_GetSystemDirectory) {
|
||||||
char npcap_path[512] = "";
|
char npcap_path[512] = "";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue