DEVPKEY_Device_Parent

The DEVPKEY_Device_Parent device property represents the device instance identifier of the parent for a device instance.

Attribute Value

Property key

DEVPKEY_Device_Parent

Property-data-type identifier

DEVPROP_TYPE_STRING

Property access

Read-only access by installation applications and installers

Localized?

Not applicable

Remarks

You can call CM_Get_DevNode_Property or SetupDiGetDeviceProperty to retrieve the value of DEVPKEY_Device_Parent property.

Windows Server 2003, Windows XP, and Windows 2000 do not directly support this property. For information about how to retrieve device relations properties on these earlier versions of Windows, see Retrieving Device Relations.

For a present device, the DEVPKEY_Device_Parent property will provide you the device instance ID of the parent of that device. For a non-present device:

  • On Windows 8 and later:
    • If the parent of the non-present device from the last time the non-present device was a present device still exists as a device on the system (present or non-present device), DEVPKEY_Device_Parent will provide the device instance ID of that parent device.
    • If the parent of the non-present device from the last time the non-present device was a present device does not still exist as a device on the system, DEVPKEY_Device_Parent will return the device instance ID of the device that is at the root of the device tree.
  • Prior to Windows 8:

Requirements

Version: Windows Vista and later versions of Windows Header: Devpkey.h (include Devpkey.h)

See also

SetupDiGetDeviceProperty