Tech Support > Microsoft Windows > Drivers > DDK: error LNK2001: unresolved external symbol "__declspec(dllimport) unsigned long __cdecl HalGetBusData(enum _BUS_DATA_TYPE,unsigned long,unsigned long,void *,unsigned long)" (__imp_?HalGetBusData@@YAKW4_BUS_DATA_TYPE@@KKPAXK @Z)
DDK: error LNK2001: unresolved external symbol "__declspec(dllimport) unsigned long __cdecl HalGetBusData(enum _BUS_DATA_TYPE,unsigned long,unsigned long,void *,unsigned long)" (__imp_?HalGetBusData@@YAKW4_BUS_DATA_TYPE@@KKPAXK @Z)
Posted by Sacalul on January 26th, 2004


I've created an Console Application with VC++ 6.0
I included the "ntddk.h". When I use HalGetBusData I receive this error
What should I do

Test.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) unsigned long __cdecl HalGetBusData(enum _BUS_DATA_TYPE,unsigned long,unsigned long,void *,unsigned long)" (__imp_?HalGetBusData@@YAKW4_BUS_DATA_TYPE@@KKPAXK @Z
Debug/Test.exe : fatal error LNK1120: 1 unresolved external
Error executing link.exe

Posted by Don Burn on January 26th, 2004


HalGetBusData and most of the items in ntddk.h cannot be called from a user
space console application.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

"Sacalul" <anonymous@discussions.microsoft.com> wrote in message
news:54756CA2-C066-4880-9170-39012793BD71@microsoft.com...
_BUS_DATA_TYPE,unsigned long,unsigned long,void *,unsigned long)"
(__imp_?HalGetBusData@@YAKW4_BUS_DATA_TYPE@@KKPAXK @Z)


Posted by Sacalul on January 26th, 2004


Then how can I retrieve PCI information on a console or dialog application?

Posted by Don Burn on January 26th, 2004


Wrtie a device driver, and by the way HalGetBusData will not work on Windows
2000, XP or 2003.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

"Sacalul" <anonymous@discussions.microsoft.com> wrote in message
news:9FBA01B8-3492-4EB9-930D-88F3230C059E@microsoft.com...



Posted by Maxim S. Shatskih on January 26th, 2004


By WMI only.

If WMI does not provide this - then sorry, your task cannot be solved. MS
considered this information as being not necessary to anybody but the driver
writers.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


"Sacalul" <anonymous@discussions.microsoft.com> wrote in message
news:9FBA01B8-3492-4EB9-930D-88F3230C059E@microsoft.com...