| View previous topic :: View next topic |
| Author |
Message |
Juan Araya Guest
|
Posted: Mon May 30, 2005 3:05 pm Post subject: How to detect hardware deviced ID with delphi |
|
|
Good morning
How can I detect a hardware deviced ID using Delphi 5. I would like to be able to obtain the device ID of a modem or a network card and get an information similar to this one:
DeviceNPF_{BD0F95E8-97C8-413C-92B2-4237FBCB052A}
Thanks a lot in advanced
Juan Araya
|
|
| Back to top |
|
 |
danny heijl Guest
|
Posted: Tue May 31, 2005 4:07 pm Post subject: Re: How to detect hardware deviced ID with delphi |
|
|
Juan Araya schreef:
| Quote: | How can I detect a hardware deviced ID using Delphi 5. I would like to be able to obtain the device ID of a modem or a network card and get an information similar to this one:
DeviceNPF_{BD0F95E8-97C8-413C-92B2-4237FBCB052A}
|
Use the setup api (pascal header translation available form Jedi):
- Get a device handle using SetupDiGetClassDevs.
- Use this handle to enumerate all devices using SetupDiEnumDeviceInfo.
- get the relevant device properties for each device with
SetupDiGetDeviceRegistryProperty.
The setup api functions are documented in the MS SDK on MSDN.
Danny
---
|
|
| Back to top |
|
 |
|