mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-09-22 17:08:38 +02:00
Merge 739ff4d637 into b3d47f2ae5
This commit is contained in:
@@ -34,9 +34,12 @@ PCAPDLL::PCAPDLL()
|
||||
int len = GetSystemDirectory(dllPath, 480); // be safe
|
||||
if (len) {
|
||||
_tcscat_s(dllPath, 512, TEXT("\\Npcap"));
|
||||
cookie = AddDllDirectory(dllPath);
|
||||
WCHAR dllPath_w[512] = { 0 };
|
||||
if (mbstowcs(dllPath_w, dllPath, 512)) {
|
||||
cookie = AddDllDirectory(dllPath_w);
|
||||
}
|
||||
}
|
||||
dll = LoadLibraryEx(TEXT("wpcap.dll"), nullptr, LOAD_LIBRARY_SEARCH_USER_DIRS);
|
||||
dll = LoadLibraryEx(TEXT("wpcap.dll"), nullptr, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
|
||||
|
||||
if (cookie)
|
||||
RemoveDllDirectory(cookie);
|
||||
|
||||
Reference in New Issue
Block a user