USB Monitoring Control - TODO
Download USB Monitoring Control Hide this button

How to Retrieve USB Device Properties

This section describes the steps you need to carry in order to retrieve the properties of the USB device.

  1. Obtain the IDevice pointer for the device in question.

  2. Take the values of the IDevice.Name, IDevice.Icon, IDevice.Location, IDevice.Manufacturer and IDevice.Key properties.

    CComBSTR Location, Name, Manufacturer, DeviceKey;
    
    pDevice->get_Location(&Location);
    pDevice->get_Name(&Name);		
    pDevice->get_Manufacturer(&Manufacturer);
    pDevice->get_Key(&DeviceKey);
    
    CComVariant bPresent;
    pDevice->get_Present(&bPresent.boolVal);
    
    hhdusbmcLib.Device device = monitor.ConnectedDevice;
    string strName = device.Name;
    bool bPresent = device.Present;
    string strLocation = device.Location;
    string strMan = device.Manufacturer;
    string strKey = device.Key;
    Icon ico  = Icon.FromHandle(device.Icon);