[Winpcap-users] Debugging a winpcap exception

Chris Morgan chmorgan at gmail.com
Wed Jan 6 11:56:19 PST 2010


On Wed, Jan 6, 2010 at 11:31 AM, Gianluca Varenni
<gianluca.varenni at cacetech.com> wrote:
>
>
> --------------------------------------------------
> From: "Chris Morgan" <chmorgan at gmail.com>
> Sent: Monday, January 04, 2010 1:45 PM
> To: <winpcap-users at winpcap.org>
> Subject: [Winpcap-users] Debugging a winpcap exception
>
>> I'm trying to debug some very odd behavior in a .net application that
>> pinvokes winpcap to capture network packets. The behavior I see seems
>> indicative of memory corruption, when I run under the vs debugger all
>> events seem to stop until I do a 'break all' and continue after
>> setting breakpoints. Even then things only run for a short while.
>>
>> I switched to using windbg and after running I see this exception
>> which may or may not be the issue. I'm having trouble continuing
>> because I'm having difficulty building wpcap.dll in debug mode, it
>> wants packet.lib but after building packet.lib it still won't build.
>
> Which configuration of packet.dll did you build? Did you follow the
> instructions at
>
> http://www.winpcap.org/docs/docs_411/html/group__compilation.html
>
> Have a nice day
> GV
>

I was trying to follow the instructions there. I've been doing
software development for a long time now and those instructions are
pretty confusing. It might make sense to have a single solution that
contains both the packet and wpcap projects and so the targets can be
synchronized to avoid the problem below. Also putting the solution at
a parent directory instead of a subdirectory to make it easier to
find. I can submit patches if there is any interest or not if there is
a good reason why things are how they are that I'm unaware of.

I'm building the 'Debug No Netmon' target for the packet solution. The
'Debug' target says npptools.lib can't be found.

Looking at the linker arguments for wpcap the additional linker
directory is set to '..\..\packetNtx\Dll\Project\Debug\x86' which is
the output directory for the 'Debug' target of the packet solution.
Can I just change this to point at the
'..\..\packetNtx\Dll\Project\Debug No Netmon\x86' directory?

Chris


More information about the Winpcap-users mailing list