I\'m a WinForms developer and I already knew how to monitor the USB\'s that connects or disconnects using WMI, but time ago I\'d discovered the DeviceWatche
You can get PnPObject from the interface ID which will give you more device specific information.
public static IAsyncOperation CreateFromIdAsync(
PnpObjectType type,
string id,
IEnumerable requestedProperties
)
seems pretty interesting fellah. You have few different options to specfy for PnpObjectType,
DeviceInterface | deviceInterface - The PnpObject represents a device interface.
DeviceContainer | deviceContainer - The PnpObject represents a device container.
Device | device -The PnpObject represents a device.
DeviceInterfaceClass | deviceInterfaceClass - The PnpObject represents a device interface class.
The id actually is interface id, which you already received.
Also note that you have list of properties you can ask for(requstedProperties argument): http://msdn.microsoft.com/en-us/library/hh464997.aspx#ListOfCanonicalProperties.
It's true that there's not too much for you, but don't be scared. There's a lot more of them: http://msdn.microsoft.com/en-us/library/ff553416.aspx
If you check devpkey.h, you can find interesting properties, such as:
Some of the things are device specfc, some of not. You can get even more properties through devmgmt.msc(Details->Property). There's also bunch of stuff in the registry. The Unified device property model discusses this: http://msdn.microsoft.com/en-us/library/ff553515(v=vs.85).aspx
PnP api has following methods:
Await DeviceInformation.FindAllAsync()
Await Pnp.PnpObject.FindAllAsync(Pnp.PnpObjectType.DeviceContainer, ...)
Await Pnp.PnpObject.FindAllAsync(Pnp.PnpObjectType.Device, ...)
Await Pnp.PnpObject.FindAllAsync(Pnp.PnpObjectType.DeviceInterface, ...)
Await Pnp.PnpObject.FindAllAsync(Pnp.PnpObjectType.DeviceInterfaceClass, ...)
Await Pnp.PnpObject.CreateFromIdAsync(..., id, ...)
You can read this article: http://www.codeproject.com/Articles/458550/Device-enumeration-in-Windows
It has everything, source code, keys, and shows how to dump all the properties from devices into file. This way you can see what properties your USB stick has.