Skip to content

Fixed Npcap related errors in PCAPDLL::PCAPDLL()#64

Open
vits71 wants to merge 2 commits intointrepidcs:masterfrom
vits71:Npcap-fix
Open

Fixed Npcap related errors in PCAPDLL::PCAPDLL()#64
vits71 wants to merge 2 commits intointrepidcs:masterfrom
vits71:Npcap-fix

Conversation

@vits71
Copy link
Copy Markdown

@vits71 vits71 commented Jul 18, 2024

PCAPDLL constructor has alternative path for Npcap libraries when libicneo is build with LIBICSNEO_NPCAP_INCLUDE_DIR. There are two bugs in this path:

dllPath variable used for AddDllDirectory() is of type TCHAR [] but AddDllDirectory() expects LPWSTR so the string needs to be converted to wide string first.
LoadLibraryEx() uses LOAD_LIBRARY_SEARCH_USER_DIRS so it is unable to load other dependent modules. Proper flag should be LOAD_LIBRARY_SEARCH_DEFAULT_DIRS which includes both user and system paths to search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant