App to retrieve various Device properties, their parent child relationship - device manager

Hi All,
I need to write an application that obtains various data about all devices that are currently enumerated by the PNP manager at any given time. This data include their registry properties, device statuses and potentially their parent child data as well. The final app should have the functionality of the “Details” tab of the system supplied device manager applet plus the parent child relationship so that I can build the device tree of all devices. I believe that I need to write an app that consumes “Unified Device Property Model” / setup/CM_* API. I am seeking your thoughts and directions on this. Thanks in advance.

Your belief is correct, this is the right path.

Thanks Doron. Is there any sample that I can use as a base?

Don’t know offhand. Look for the various apis usage in the WDK sample repo

Note that almost everything Device Manager can do can also be done by the command line “devcon” tool, and the source for that is available.

Thank you both.