mirror of
https://github.com/digarok/gsplus.git
synced 2024-11-24 06:34:02 +00:00
win32 - support for npcap which is a successor to winpcap. winpcap is still supported.
This commit is contained in:
parent
0b03aad15d
commit
324c9a191f
@ -138,7 +138,21 @@ static void EthernetPcapFreeLibrary(void)
|
||||
|
||||
static BOOL EthernetPcapLoadLibrary(void)
|
||||
{
|
||||
/*
|
||||
* npcap is c:\System32\Npcap\wpcap.dll
|
||||
* winpcap is c:\System32\wpcap.dll
|
||||
*
|
||||
*/
|
||||
if (!pcap_library) {
|
||||
/* This inserts c:\System32\Npcap\ into the search path. */
|
||||
char buffer[512];
|
||||
unsigned length;
|
||||
length = GetSystemDirectory(buffer, sizeof(buffer) - sizeof("\\Npcap"));
|
||||
if (length) {
|
||||
strcat(buffer + length, "\\Npcap");
|
||||
SetDllDirectory(buffer);
|
||||
}
|
||||
|
||||
pcap_library = LoadLibrary(TEXT("wpcap.dll"));
|
||||
|
||||
if (!pcap_library) {
|
||||
|
Loading…
Reference in New Issue
Block a user