Smart Device Functions:
Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than setupapi, prefix the name with the module name and a period.
Declare Function CM_Get_DevNode_Registry_Property Lib "setupapi.dll" (TODO) As TODO
deviceInstance, A caller-supplied device instance handle that is bound to the local machine.
property, A CM_DRP_-prefixed constant value that identifies the device property to be obtained from the registry. These constants are defined in Cfgmgr32.h.
pulRegDataType, Optional, can be NULL. A pointer to a location that receives the registry data type, specified as a REG_-prefixed constant defined in Winnt.h.
buffer, Optional, can be NULL. A pointer to a caller-supplied buffer that receives the requested device property. If this value is NULL, the function supplies only the length of the requested data in the address pointed to by pulLength.
length, A pointer to a ULONG variable into which the function stores the length, in bytes, of the requested device property. If the Buffer parameter is set to NULL, the ULONG variable must be set to zero. If the Buffer parameter is not set to NULL, the ULONG variable must be set to the length, in bytes, of the caller-supplied buffer.
flags, Not used, must be zero.
Alternative Managed API:
Do you know one? Please contribute it!
In most cases you can use SetupDiGetDeviceRegistryProperty.
Also Microsoft.Win32.RegistryValueKind only contains enumerations for the basic kinds.
Tips & Tricks:
Please add some!
// The following code shows how to grab the parent device's driver name. The devinfo_data.DevInst is
The SetupDiGetDeviceRegistryProperty function retrieves the specified device property. This handle is typically returned by the SetupDiGetClassDevs or SetupDiGetClassDevsEx function. If the function succeeds, the return value is nonzero.
8/6/2014 10:53:59 PM - firstname.lastname@example.org
Please edit this page!
Do you have...