[Winpcap-users] pcap_close crash when used in a DLL

MARTIN, Jean-loic (FR - SX) jean-loic.martin at fr.meggitt.com
Thu Feb 19 11:20:27 UTC 2015


Hello gents,

I'm facing a problem with pcap_close.

I have a DLL where I use pcap_open and pcap_close.
And an executable program which uses this DLL.
The problem appears only when I uses the \device\NPF_GenericDialupAdapter .
With a real adapter there is no problem.

Also , when I use the same source code in an application (without a DLL) there is no problem.
So the problem comes from using pcap_close in a DLL with the \device\NPF_GenericDialupAdapter

I have attached the source code and project for Code::Blocks for both DLL and application.

Does someone facing the same problem ?

To explain what is done in the DLL and in the application :

1.       The application does only a call to EdrEth_OpenDevice(0) , wait 1s, and call to EdrEth_CloseDevice();

The crash appears after the call to EdrEth_CloseDevice. Crash appears in debug mode and release mode.

Everything is ok when I debug the DLL (adhandle variable is correctly set).

[cid:image001.png at 01D04C3E.71CBA840]



2.       The DLL does the pcap_open in EdrEth_OpenDevice function and the pcap_close in the EdrEth_CloseDevice function.


Last information, I use a PC with Windows XP SP3.


Best regards / Cordialement,

Jean-Loïc MARTIN
Software engineer/ Ingénieur développement logiciel

Meggitt Sensing Systems "MSS"
196 rue Louis Rustin
BP63108
Archamps Technopole
74166 Archamps
FRANCE

(Ligne directe) +33 (0) 4 56 66 03 51 (standard) +33 (0) 4 50 95 43 55 Poste : 519
jean-loic.martin at fr.meggitt.com<mailto:jean-loic.martin at fr.meggitt.com>

www.meggitt.com<http://www.meggitt.com>
www.sensorex.fr<http://www.sensorex.fr>
P N'imprimez que si necessaire / Print only if necessary

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20150219/dac76ab1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 13760 bytes
Desc: image001.png
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20150219/dac76ab1/attachment-0001.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: A_POLICY_VIOLATED_FILE_WAS_DETECTED_AND_REMOVED.TXT
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20150219/dac76ab1/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: A_POLICY_VIOLATED_FILE_WAS_DETECTED_AND_REMOVED.TXT
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20150219/dac76ab1/attachment-0003.ksh>


More information about the Winpcap-users mailing list