USB Port Monitoring Control
USB Monitoring Control - USB Device Data Monitoring ActiveX Component Library

How to Retrieve USB Device Properties

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >

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.
    C++
    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);
    
    C#
    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);
    
< PreviousTopNext >
Copyright © 2011 HHD Software. All rights reserved.