USB Monitoring Control - ActiveX Component Library for USB Data Monitoring, API for Software Developers
Download USB Monitoring Control Hide this button

IDevice Interface

This interface is implemented by the USB Monitoring library for each registered USB device. Use this interface to query the USB device properties.

Declaration

interface IDevice extends ${IDispatch} {
    // Properties
    readonly ${Manufacturer}: string;
    readonly ${Location}: string;
    readonly ${Key}: string;
    readonly ${Present}: boolean;
    readonly ${Name}: string;
}
public interface IDevice : ${IDispatch}
{
    // Properties
    string ${Manufacturer} { get; }
    string ${Location} { get; }
    string ${Key} { get; }
    IntPtr ${Icon} { get; }
    bool ${Present} { get; }
    string ${Name} { get; }
}
struct IDevice : IDispatch
{
    // Properties
    _bstr_t ${Manufacturer};  // get 
    _bstr_t ${Location};  // get 
    _bstr_t ${Key};  // get 
    HICON ${Icon};  // get 
    VARIANT_BOOL ${Present};  // get 
    _bstr_t ${Name};  // get 
};

IDevice Properties

Manufacturer

readonly Manufacturer: string;
string Manufacturer { get; }
_bstr_t Manufacturer;  // get 

Device manufacturer string.

Location

readonly Location: string;
string Location { get; }
_bstr_t Location;  // get 

Device location string.

Key

readonly Key: string;
string Key { get; }
_bstr_t Key;  // get 

Device key. For example, \??\usb#vid_0458&pid_003a#5&35eda8e7&0&2#{889bf6d2-b5a9-42af-9364-dcc1b727885b}

Icon

// This property is not available in scripting environment
IntPtr Icon { get; }
HICON Icon;  // get 

Handle for device icon.

Present

readonly Present: boolean;
bool Present { get; }
VARIANT_BOOL Present;  // get 

This property equals true if device is ready and running and false otherwise. Note that USBMC enumerates all devices - both connected and disconnected. For example - if you will remove Flash Drive - it will still be enumerated, but Present property will be set to false.

Name

readonly Name: string;
string Name { get; }
_bstr_t Name;  // get 

Device friendly name. For example, USB Human Interface Device.