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

Oh hell yes. Mark nailed it.

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

-----Original Message-----
From: Roddy, Mark [mailto:xxxxx@stratus.com]
Sent: Thursday, January 03, 2002 10:27 AM
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@broadstor.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