I successfully compiled ndpiReader.exe on Windows 11 using the MSYS2 MINGW64 environment, and it runs fine within the MSYS2 shell. I was able to capture live traffic and perform protocol detection without issues.
Then I tried to copy the ndpiReader.exe binary along with the two dependent DLLs (wpcap.dll and Packet.dll) to a native Windows CMD environment. However, when I executed it there, it failed to capture any packets and reported the following error:
ERROR: could not open \\Device\\NPF_{864AF10B-5D3C-4469-B3A6-C6F6644278E6}: No such file or directory
The reason I’m doing this is because I want to test integrating ndpiReader.exe as a Wireshark extcap plugin for custom protocol analysis. However, it seems that the binary compiled under MSYS2 cannot correctly access Npcap interfaces in a standard Windows environment — likely due to MSYS2-specific runtime dependencies or environmental factors.