network arplab finished
This commit is contained in:
19
network/start/lib/npcap/Examples-remote/misc/misc.h
Normal file
19
network/start/lib/npcap/Examples-remote/misc/misc.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <tchar.h>
|
||||
#include <stdio.h>
|
||||
BOOL LoadNpcapDlls()
|
||||
{
|
||||
_TCHAR npcap_dir[512];
|
||||
UINT len;
|
||||
len = GetSystemDirectory(npcap_dir, 480);
|
||||
if (!len) {
|
||||
fprintf(stderr, "Error in GetSystemDirectory: %x", GetLastError());
|
||||
return FALSE;
|
||||
}
|
||||
_tcscat_s(npcap_dir, 512, _T("\\Npcap"));
|
||||
if (SetDllDirectory(npcap_dir) == 0) {
|
||||
fprintf(stderr, "Error in SetDllDirectory: %x", GetLastError());
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user