chacham15
chacham15

Reputation: 14251

How do I get a device's parent in c++ on windows?

I have found SetupDiGetDeviceRegistryProperty to get properties from devices, but I havent figured out how to get the parent property (you can see this property when you open a devices properties in device manager, click on details, and choose parent from the property drop down. How do I access that property from native c++ code?

Upvotes: 0

Views: 804

Answers (2)

chacham15
chacham15

Reputation: 14251

I got it by using: CM_Get_Parent found this reference thanks to Hans though, thank you!

Upvotes: 1

Hans Passant
Hans Passant

Reputation: 942000

The predefined DEVPKEY_Device_Parent guid is the key for the Parent property. Read it with SetupDiGetDeviceInterfaceProperty().

Upvotes: 2

Related Questions