"2B" <2...@hotmail.com> wrote in message news:coiila$38h$1...@dns3.cae.ca...
"2B" <2...@hotmail.com> wrote in message news:coiila$38h$1...@dns3.cae.ca...
"Pavel A." <pav...@NOwritemeNO.com> wrote in message
news:%23tsGyBz...@tk2msftngp13.phx.gbl...
Thank you
"Arkady Frenkel" <arkadyf@hotmailxdotxcom> wrote in message
news:%23ITgke6...@tk2msftngp13.phx.gbl...
You may want to look at the article "Replacing HalGetBusData in Windows
2000" that is at http://www.hollistech.com/. If you approach thing this way
you will have a PCI bus driver filter, and there are other ways you can
potentially get your data.
Note: If you are directly manipulating the PCI bus ports to read the device
data (some people have tried this) you are setting the sytem up for a crash.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
"2B" <2...@hotmail.com> wrote in message news:cokpt0$sct$1...@dns3.cae.ca...
Question is who is using who. Drivers PCI device or vice versa.
You can use SetupAPI functions to enumerate trough all drivers (or only the ones that interest you). Then with same set of functions
you can obtain VID, PID numbers and match them to the ones that you already have/know.
Start by examining sources from DDK of devcon utility.
First function that you will need to know is SetupDiGetClassDevs.
HTH,
Slobodan
"2B" <2...@hotmail.com> wrote in message news:coiila$38h$1...@dns3.cae.ca...
I don't know if there is something special about CompactPCI I have never used it personally.
For Step 1, What API functions do you use to do this?
Step 2. What is exactly that you want to obtain? What information's? What do you have so far that can be used to make a match to
driver?
Looking from Device Manager are the information's that you need there? If they are then look at devcon sample.
Regards,
Slobodan
"2B" <2...@hotmail.com> wrote in message news:conekg$4eh$1...@dns3.cae.ca...
> Thank you for all of suggestions.
> I realize that my question was not clear.
>
> I am writting an user application. This application does 2 things :
> 1. Enumerate all cPCI devices which are present in the PC
> 2. Get the information of the driver that those cPCI devices are using.
>
> The step #1 is done. I can now have the list of all cPCI devices with data
> on bus number, device id, ...
>
> The step #2 is stuck :)
>
> Thank you again for your help.
>
>
>
> "2B" <2...@hotmail.com> wrote in message news:coiila$38h$1...@dns3.cae.ca...
For Step 2:
You will want to plunder code from example in DDK called devcon.
First function that you will use is SetupDiGetClassDevs and it will give you handle that you will use in enumeration also it can
narow the count of devices that you are interested in, so you enumerate certain types of devices and not all devices present in
registry (you can do this also).
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/install/hh/install/di-rtns_8f48a4a7-e4b9-4843-aacc-88f678b4145c.xml.asp
In next step you might be interested in SetupDiEnumDeviceInfo function that you will use for actual device enumeration:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/install/hh/install/di-rtns_db6730f9-381a-4da6-91b1-046fec51f270.xml.asp
For determining if this is device that you was looking for use some of following functions: CM_Get_Device_ID,
SetupDiGetDeviceRegistryProperty
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/install/hh/install/cfgmgrfn_9b900d97-f812-412b-b12c-d64b9aba3be7.xml.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/install/hh/install/di-rtns_a60fa017-1c15-45bf-a178-37516bc0aea1.xml.asp
For some additional registry access and read operation you can use:
SetupDiOpenDeviceInterfaceRegKey
You will need to enumerate all devices and to go trough list of your information's and make matches.
HTH,
Slobodan
"2B" <2...@hotmail.com> wrote in message news:coniq2$m74$1...@dns3.cae.ca...
> Hi Slobodan,
>
> For step 1, there is no windows api function providing the service. I have
> to use a virtual device driver that scans the pci bus with the function
> HalGetBusDataByOffset() and gives me the information of the existing pci
> devices.
>
> For step 2, I'd like to obtain the driver file name (
> Ex.C:\winnt\system32\drivers\el90xbc5.sys ). The one that you can get in
> Driver Details of the Device Manager tool.
>
> Thank you Slobodan.
>
>
>
> "Slobodan Brcin (eMVP)" <sbr...@ptt.yu> wrote in message
> news:ukFof$I2EHA...@tk2msftngp13.phx.gbl...
"Slobodan Brcin (eMVP)" <sbr...@ptt.yu> wrote in message
news:uGNDcVJ2...@TK2MSFTNGP11.phx.gbl...
For step 1, there is no windows api function providing the service. I have
to use a virtual device driver that scans the pci bus with the function
HalGetBusDataByOffset() and gives me the information of the existing pci
devices.
For step 2, I'd like to obtain the driver file name (
Ex.C:\winnt\system32\drivers\el90xbc5.sys ). The one that you can get in
Driver Details of the Device Manager tool.
Thank you Slobodan.
"Slobodan Brcin (eMVP)" <sbr...@ptt.yu> wrote in message
news:ukFof$I2EHA...@tk2msftngp13.phx.gbl...
I am writting an user application. This application does 2 things :
1. Enumerate all cPCI devices which are present in the PC
2. Get the information of the driver that those cPCI devices are using.
The step #1 is done. I can now have the list of all cPCI devices with data
on bus number, device id, ...
The step #2 is stuck :)
Thank you again for your help.
"2B" <2...@hotmail.com> wrote in message news:coiila$38h$1...@dns3.cae.ca...
I followed your suggestions and found the answer for my application.
Thank you very much. Your help is unforgettable.
Best regards.
"Slobodan Brcin (eMVP)" <sbr...@ptt.yu> wrote in message
news:uGNDcVJ2...@TK2MSFTNGP11.phx.gbl...
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@storagecraft.com
http://www.storagecraft.com
"2B" <2...@hotmail.com> wrote in message news:coiila$38h$1...@dns3.cae.ca...