Discussion:
How to replace HalGetBusData on 64 bit platform
(too old to reply)
Eva
2005-08-31 01:40:16 UTC
Permalink
Dear All

I am porting a driver from 32 bit platform to 64 bit platform.
HalGetBusData is obsolete on Windows 2000 or later.
Are there anyone who know how to replace HalGetBusData on 64 bit platform?

Thank you.

Regards,
Eva
Mark Roddy
2005-08-31 02:50:52 UTC
Permalink
Post by Eva
Dear All
I am porting a driver from 32 bit platform to 64 bit platform.
HalGetBusData is obsolete on Windows 2000 or later.
Are there anyone who know how to replace HalGetBusData on 64 bit platform?
Thank you.
Regards,
Eva
What are you trying to do that requires halgetbusdata?
--
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
Eva
2005-09-02 03:27:18 UTC
Permalink
What I want to do is to get the Device ID and Vender ID of the Graphic
adapter.

I am new to using DDK.
But now I have to port a driver from x86 platofrm to x64 plarform.

I have tried to replace HalGetBusData with HalGetBusDataByOffset.
It could be compiled successfully, but there is something wrong about the
Device ID.
I know the HalGetBusDataByOffset is also obsolete.
I am still trying to replace it with PnP Manager's IRP_MN_QUERY_INTERFACE
and
IRP_MN_READ_CONFIG.
Post by Mark Roddy
Post by Eva
Dear All
I am porting a driver from 32 bit platform to 64 bit platform.
HalGetBusData is obsolete on Windows 2000 or later.
Are there anyone who know how to replace HalGetBusData on 64 bit platform?
Thank you.
Regards,
Eva
What are you trying to do that requires halgetbusdata?
--
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
Don Burn
2005-09-02 10:59:50 UTC
Permalink
Have you looked at IoGetDeviceProperty?
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
Post by Eva
What I want to do is to get the Device ID and Vender ID of the Graphic
adapter.
I am new to using DDK.
But now I have to port a driver from x86 platofrm to x64 plarform.
I have tried to replace HalGetBusData with HalGetBusDataByOffset.
It could be compiled successfully, but there is something wrong about the
Device ID.
I know the HalGetBusDataByOffset is also obsolete.
I am still trying to replace it with PnP Manager's IRP_MN_QUERY_INTERFACE
and
IRP_MN_READ_CONFIG.
Post by Mark Roddy
Post by Eva
Dear All
I am porting a driver from 32 bit platform to 64 bit platform.
HalGetBusData is obsolete on Windows 2000 or later.
Are there anyone who know how to replace HalGetBusData on 64 bit platform?
Thank you.
Regards,
Eva
What are you trying to do that requires halgetbusdata?
--
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
Mark Roddy
2005-09-02 12:01:07 UTC
Permalink
Post by Eva
What I want to do is to get the Device ID and Vender ID of the Graphic
adapter.
Is your driver a video miniport driver? Or is this information required
for some other purpose? You cannot use the PnP equivalents unless your
driver is on the stack for the pci device - which would make you a video
driver of some sort.

If for some reason you need to know the DID/VID of the video adapters
(there can be more than one, right?) you can get this information in
user mode by querying the pnp configuration using the various apis
defined in the SDK (SetupDiXXXXX).

In general (and there are exceptions) the need for HalGetBusData is a
design misunderstanding.
Post by Eva
I am new to using DDK.
But now I have to port a driver from x86 platofrm to x64 plarform.
I have tried to replace HalGetBusData with HalGetBusDataByOffset.
It could be compiled successfully, but there is something wrong about the
Device ID.
I know the HalGetBusDataByOffset is also obsolete.
I am still trying to replace it with PnP Manager's IRP_MN_QUERY_INTERFACE
and
IRP_MN_READ_CONFIG.
Post by Mark Roddy
Post by Eva
Dear All
I am porting a driver from 32 bit platform to 64 bit platform.
HalGetBusData is obsolete on Windows 2000 or later.
Are there anyone who know how to replace HalGetBusData on 64 bit platform?
Thank you.
Regards,
Eva
What are you trying to do that requires halgetbusdata?
--
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
--
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
sean
2005-08-31 03:21:07 UTC
Permalink
from 2kDDK:

HalGetBusData is obsolete and is exported only to support existing drivers.

Drivers should use the PnP Manager's IRP_MN_QUERY_INTERFACE and
IRP_MN_READ_CONFIG requests instead.

"It is exported only to support existing drivers" means you can still use it

on win2k. Considering 64 bit platform, I know little about it.
Post by Eva
Dear All
I am porting a driver from 32 bit platform to 64 bit platform.
HalGetBusData is obsolete on Windows 2000 or later.
Are there anyone who know how to replace HalGetBusData on 64 bit platform?
Thank you.
Regards,
Eva
Calvin Guan
2005-08-31 06:24:03 UTC
Permalink
If you HAVE TO use HalGet/SetBus.... for 64-bit system, use the ByOffset
variants.
Use PNP IRP or bus interface to access the PCI configuration space whenever
possible.
--
Calvin Guan (Windows DDK MVP)
NetXtreme Longhorn Miniport Prime
Broadcom Corp. www.broadcom.com
Post by Eva
Dear All
I am porting a driver from 32 bit platform to 64 bit platform.
HalGetBusData is obsolete on Windows 2000 or later.
Are there anyone who know how to replace HalGetBusData on 64 bit platform?
Thank you.
Regards,
Eva
Gary G. Little
2005-08-31 19:04:04 UTC
Permalink
The bottom line is that you need to move the NT4 legacy driver you have into
the world of PnP. Once having done that you, you will get your BARs
information when you receive the IRP_MN_START_DEVICE. There is no need for
HalGet/SetBus. To ge to PCI space youwill eiter request a bus interface from
the PCI bus or use the Read/Write commands by sending an IRP for PCI bus
configuration operations.

The personal opinion of
Gary G. Little
Post by Calvin Guan
If you HAVE TO use HalGet/SetBus.... for 64-bit system, use the ByOffset
variants.
Use PNP IRP or bus interface to access the PCI configuration space whenever
possible.
--
Calvin Guan (Windows DDK MVP)
NetXtreme Longhorn Miniport Prime
Broadcom Corp. www.broadcom.com
Post by Eva
Dear All
I am porting a driver from 32 bit platform to 64 bit platform.
HalGetBusData is obsolete on Windows 2000 or later.
Are there anyone who know how to replace HalGetBusData on 64 bit platform?
Thank you.
Regards,
Eva
Loading...