win32: pcapif: ensure we can run with npcap as well

By default, npcap keeps its DLLs not in system32 but in system32/npcap.
To load DLLs from there, mark them as "delay load DLLs" and adjust the
DLL search path before using/loading them.

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
Simon Goldschmidt
2023-06-29 22:11:55 +02:00
parent bfcbf80221
commit 1a5dffb931
4 changed files with 38 additions and 0 deletions

View File

@@ -1057,6 +1057,9 @@ pcapif_init(struct netif *netif)
int local_index;
SYS_ARCH_DECL_PROTECT(lev);
pcapifh_init_npcap();
SYS_ARCH_PROTECT(lev);
local_index = ethernetif_index++;
SYS_ARCH_UNPROTECT(lev);