RE: jumping to invalid addresses when calling HAL leg acy fns from a WDM driver

You’re right that’d be stretching it a bit too tin. However I have the
luxury of only supporting Windows2K and WindowsXP so older OS
compatibility is not an issue. The libs have been around for a while and
rewriting part of their code would have too much of a negative impact on
my schedule. I do have the code to these libs I’m compiling them in
Win2k, I’m just trying to leave them untouched as much as I possibly
can.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Thursday, January 03, 2002 1:55 PM
To: NT Developers Interest List
Subject: [ntdev] RE: jumping to invalid addresses when calling HAL leg
acy fns from a WDM driver

Well I’m confused. You want this driver to run on (win)DOS/9x/Me while
making legacy nt4 ddk calls? Isn’t that a bit much to expect?
Also, are your offending libraries binary only, like you can’t recompile
them and they were built with the nt4 ddk? I don’t think that actually
works.
-----Original Message-----
From: Christian Bechette [mailto:xxxxx@matrox.com]
Sent: Thursday, January 03, 2002 2:04 PM
To: NT Developers Interest List
Subject: [ntdev] RE: jumping to invalid addresses when calling HAL leg
acy fns from a WDM driver
Stopping being a wdm driver is not an option, because of some other
requirements I’m bound to. This should be working - I ran tests on some
simple wdm drivers and it behaved. There’s something in my project that
causes the execution to fail, I just haven’t digged it out yet. Any
constructive criticism is appreciated.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Thursday, January 03, 2002 1:27 PM
To: NT Developers Interest List
Subject: [ntdev] RE: jumping to invalid addresses when calling HAL leg
acy fns from a WDM driver

Your driver isn’t a wdm driver, so stop trying to force it to be one.
WDM is really the subset of the nt ddk that is supposed to run on both
(win)DOS/9x/Me and W2K. You stopped being a WDM driver as soon as you
bought into the requirement to use your libraries that make non-wdm
calls. So include ntddk.h and stop being a wdm driver.

-----Original Message-----
From: Christian Bechette [mailto:xxxxx@matrox.com]
Sent: Thursday, January 03, 2002 1:30 PM
To: NT Developers Interest List
Subject: [ntdev] RE: jumping to invalid addresses when calling HAL
legacy fns from a WDM driver
I agree these legacy calls shouldn’t be needed anymore. However I’m
linking with some older libraries and those are the ones making the
function calls. These libs aren’t mine and I can’t rewrite any of their
code so I got to take them as-is…

cb

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary Little
Sent: Wednesday, January 02, 2002 3:14 PM
To: NT Developers Interest List
Subject: [ntdev] RE: jumping to invalid addresses when calling HAL
legacy fns from a WDM driver

One question I have is what is it that you need from
HalGetBusDataByOffset that is not supplied by the Start Device parameter
you receive from IRP_MN_START_DEVICE. Slot number? Bus number? Both of
those are generally superfluous to PnP operations.

Gary G. Little
Broadband Storage, Inc.
xxxxx@broadstor.com
xxxxx@inland.net
(949) 7372731

-----Original Message-----
From: Christian Bechette [mailto:xxxxx@matrox.com]
Sent: Wednesday, January 02, 2002 11:26 AM
To: NT Developers Interest List
Subject: [ntdev] jumping to invalid addresses when calling HAL legacy
fns from a WDM driver

I have an issue that I hope someone has already encountered. I’m
currently writing a wdm driver which needs to call some legacy HAL
functions such as HalGetBusDataByOffset etc. Since I include wdm.h I
have to manually supply the prototypes for the HAL functions in one of
my header files. The driver will compile and link without any errors,
however at runtime when actually calling these legacy fns the execution
jumps to an invalid address causing a bsod, just like if the linker
didn’t do its job properly. Eg. The imp [HalGetBusDataByOffset]
address is invalid and not even in the HAL module’s address range.

I’ve done some tests modifying makefile.def and it turns out that it
will work only if the HAL libraries are processed before the WDM libs,
which prevents me from using DRIVERTYPE=WDM in my SOURCES file. Although
this will make the driver link and run ok it’s still more of a hack than
anything else. Anyone has any idea what may be causing this?

thanks for reading, and happy new year everyone!
chris

You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@matrox.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@matrox.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@matrox.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com