How to get Windows Devices

Hi all,

I am writing a program to get the windows device list, just as Windows
Device Manager does. And I will also want to acquire the properties of
some specified device.

Could anyone have any idea about this?

Any response will be appreciated.