ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Wireshark fails to start with wpcap.dll built by Visual Stud

From: Yang Luo <hsluoyb@xxxxxxxxx>
Date: Thu, 4 Feb 2016 20:33:02 +0800
OK. I have found out the issue. In the old 1.0.0 libpcap code of \wpcap\libpcap\pcap-stdinc.h. There's such code:

#if _MSC_VER < 1500
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define strdup _strdup

If updated to VS2013, _MSC_VER is defined as 1800, so the definitions don't take effect. So old version libpcap is some kind of unreliable.
Technically, it's so weird because it doesn't influence the build. In the runtime, Nmap and WinDump is not affected. Wireshark under Win7 is not affected. Only Wireshark under Win8 and Win10 crashes. This issue is closed now but if someone could tell me the reason it would be better.


On Thu, Feb 4, 2016 at 2:21 AM, Yang Luo <hsluoyb@xxxxxxxxx> wrote:
OK. I decided to build wpcap.dll with VS2013 at least. And the same issue. (mentioned in the first two posts). It will cause Wireshark on Win8.1/10 x64 to crash.
I also used MBCS option instead of Unicode, the same with WinPcap trunk. So weird.

I have attached the wpcap.dll file. Substitute it with the original WinPcap/Npcap version in C:\Windows\System32. Then launch Wireshark and you will see the crash.

On Thu, Feb 4, 2016 at 2:11 AM, Graham Bloice <graham.bloice@xxxxxxxxxxxxx> wrote:

On 3 February 2016 at 17:44, Gerald Combs <gerald@xxxxxxxxxxxxx> wrote:
It make sense to switch to VS 2015. It uses the Universal CRT, which ships
with Windows 10 and is available via Windows Update (KB 2999226) on earlier
versions of Windows.

I'm hoping to switch Wireshark's Windows installers to VS 2015 before 2.2
is released, but that depends on our third party DLLs (most notably Kerberos).

Caution.  There have been issues with the Universal CRT, so much so that TortoiseSVN, which jumped onto 2015 very early, now copies the CRT DLL's into the application directory (which is permitted) to avoid the windows update part of the OS portion.

As it happens, my next but one task in the day job is to move our build over to VS2015, so I'll be finding out a lot about this in the next 2 weeks.

As I think I mentioned last year, I did make changes to our winpcap repo to build under VS2013 (all parts) and I didn't find any deployment issues at all.  Hopefully I can check that again very soon.  The bit we need to organise is the signing of the build products.  I can sign with my companies cert for my testing but obviously can't release that to anyone else.  This build of WinPcap was only done to bring the build environment up to date, there were no other functional changes in WinPcap.

Graham Bloice

Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>