Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-users: Re: [Wireshark-users] Building for WinXP and Win2K

From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Mon, 25 Jun 2007 17:08:19 +0100
Andy.Ling@xxxxxxxxxxx wrote:
>> McCabe John G wrote:
>>> FWIW - I saw this with a few apps I built recently on VS2k5 and 
>> copied across to a Win2k system that hadn't had VS 2k5 installed on 
>> it. When I installed VS2k5 the problem went away which suggests it's
>> something to do with the libraries that the app is being linked 
>> with. I didn't get to the bottom of the problem though, but maybe 
>> this will help as a pointer.
>>> John 
> 
> OK, I seem to have fixed it for me. I had a close look at :-
> 
> http://wiki.wireshark.org/BuildingAndInstalling#head-f3db6fe160adbafc0c99a0e4327604db891172ce
> 
> and tried the bit that says :-
> 
>  Problem tshark is not a valid win32 application. DO NOT run this 
> "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd"
> . 
> 
> And that seems to have fixed it.
> 
> I was actually running :-
> 
> "\Program Files\Microsoft SDK\SetEnv.Bat"
> 
> But not running it seems to fix the problem.
> 

It would seem that something in the W2K3 SDK build tools is responsible for
the breakage.  My guess is the manifest tool MT.

> To answer the question about build environment. I'm building using Visual 
> Studio V7.10
> 
>> Dependency Walker from http://www.dependencywalker.com/ is a useful tool 
> for
>> determining what's up in these situations.
>>
> 
> I tried this and it shows up two problems. APPHELP.DLL cannot be found
> and MPR.DLL has a problem with WNetRestoreConnectionA
> 

MPR.DLL seems to give that error on every system I've tried depends on.  You
can cross check by running depends on a system executable, i.e. iexplore.exe.
 You should find the same errors indicating that they aren't really an issue.

> This is exactly the some on the working build and the build that fails.
> So this isn't showing up what the problem is.
>

See above.

>> It seems though as there is a problem with the executable and W2K 
> doesn't like
>> something in the PE header.  Unfortunately no-one who has had the 
> problem has
>> come back with the solution.
>>
> 
> I can send a copy of the duff one to anyone that wants to play with it.
> It's not obvious what is wrong with it. Win2K just doesn't like it.
>

As it's not a dependency problem, it comes back to the actual exe again.  Can
you try running tshark.exe from a cmd prompt and if it exhibits the same
problem, zip it up and send it to me directly.

-- 
Regards,

Graham Bloice