AnsweredAssumed Answered

vrf Using the ToolHelp library: Upgrade 5

Question asked by VRFuser on Sep 11, 2002
Shawn,

Reiner sent me his version of this -- It is really Awesome!

Jeff Davis
Embedded Systems - CDI Technical Services
3137 E Elwood # 160
Phoenix, Arizona 85034
Phone: (602)431-4497 (x226)
Cell: (480)330-1431
Fax: (602)431-4435
http://www.cdicad.com

> -----Original Message-----
> From: Shawn Fessenden [mailto:shawnf@ameritech.net]
> Sent: Thursday, September 12, 2002 09:09
> To: VEE vrf
> Subject: [vrf] RE: Using the ToolHelp library: Upgrade 5
>
>
> Ok, well the mystery is solved.
>
> I also have a toolhelp.dll in my system32 directory. This was
> originally
> puzzling, because this computer has disk trauma and last time
> it croaked it
> was re-partitioned & loaded with W2K from square one. Looking
> into the file
> with my favorite hex dumper, I see the familiar MZ header.
> Following the
> e_lfanew member to what I expected to be a PE header I found
> an NE header!
> IOW this toolhelp.dll runs under Windows 3.1, not NT.
>
> This is confirmed by right-clicking and viewing Properties.
> The Version tab
> says it all. This is version 3.10.0.103. It also specifies
> that this file
> requires WOW (Windows On Windows) version 4.
>
> This explains what's happening in VEE: VEE is trying to use
> LoadLibrary to
> load toolhelp.dll. LoadLibrary sees the NE header and says
> this isn't a
> valid Win32 file (which it's not). For VEE to use this file,
> it would have
> to start the WOW VDM, load it in that and use special
> "thunking" calls to
> gain access to it. No wonder it doesn't work.
>
> So what about 9x? There's a toolhelp.dll on my 98 system and
> it says it's
> version 4.1.0.1998 but that's an NE also and it won't work
> either, though
> you get one of those famous "phony" messages: "A device
> attached to the
> system is not functioning".
>
> So there's no PE version of toolhelp? Yup, apparently so. So
> what about 9x
> and NT 3 & 4 users? I guess you're just SOL!
>
> I'm sorry
>
> I was under the impression that this would work under all versions of
> Windows (maybe with minor modifications). I guess I was
> wrong, though I'm
> *certain* I've used the toolhelp library on 9x platforms
> before. I don't
> know how it works, but it does. Maybe this is some MS
> compiler "magic" where
> it just knows it has to thunk calls to 16-bit DLLs (though
> you have to do
> that yourself on NT). I don't know. I'm confused.
>
> Now, there *IS* a way to obtain this same information from
> the NT 3.51 & up
> registry, but I shudder at the thought of using it in VEE.
> The whole reason
> the PSAPI was created was to shield programmers from the evil
> of Performance
> Data in the registry (which is where all this information
> comes from in the
> first place). I promise to look in to the problem, but I sure
> don't promise
> to do anything about it
>
> This is just one of those goofy little projects that go on
> all the time -
> the difference is that I decided to publish this one because
> I thought it
> would be interesting for VEE users to see that the lack of
> compiler savvy is
> no barrier to Windows power. This was more or less just a
> demonstration of
> using arrays to substitute for structures in Windows API
> calls. Then it got
> lost dissecting the PE file structure, and now I find out it
> only works on
> Windows 2000!
>
> Most of these projects never see the light of day.
> -SHAWN-
>
>
> ---
> You are currently subscribed to vrf as: jeff.davis@cdi-es.com
> To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
> To unsubscribe send a blank email to
> "leave-vrf@it.lists.it.agilent.com".
> To send messages to this mailing list,  email
> "vrf@it.lists.it.agilent.com".
> If you need help with the mailing list send a message to
> "owner-vrf@it.lists.it.agilent.com".
>
> _____________________________________________________________________
> This e-mail has been scanned for viruses by the WorldCom
> Internet Managed Scanning Service - powered by MessageLabs.
> For further information visit http://www.worldcom.com
>

_____________________________________________________________________
This e-mail has been scanned for viruses by the WorldCom Internet Managed Scanning Service - powered by MessageLabs. For further information visit http://www.worldcom.com

---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@it.lists.it.agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes