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

IMonitoring Interface

This interface is implemented by the Monitor object in the USB Monitoring Control library. You get this interface by calling the IUsbMonitor.CreateMonitor method and use it to start monitoring the USB device.

Declaration

interface IMonitoring {
    // Properties
    readonly ${Connected}: boolean;
    readonly ${ConnectedDevice}: ${IDevice};
    readonly ${UsbMonitor}: ${IUsbMonitor};

    // Methods
    ${Connect}(Device?: ${IDevice}, HeadersOnly?: boolean): void;
    ${Disconnect}(): void;
}
public interface IMonitoring
{
    // Properties
    bool ${Connected} { get; }
    ${IDevice} ${ConnectedDevice} { get; }
    ${IUsbMonitor} ${UsbMonitor} { get; }

    // Methods
    void ${Connect}(${IDevice} Device, bool HeadersOnly);
    void ${Disconnect}();
}
struct IMonitoring : IDispatch
{
    // Properties
    VARIANT_BOOL ${Connected};  // get 
    ${IDevicePtr#IDevice} ${ConnectedDevice};  // get 
    ${IUsbMonitorPtr#IUsbMonitor} ${UsbMonitor};  // get 

    // Methods
    HRESULT ${Connect}(_variant_t Device, _variant_t HeadersOnly);
    HRESULT ${Disconnect}();
    HRESULT ${AddNativeListener}(${INativeListener *#INativeListener} Listener);
    HRESULT ${RemoveNativeListener}(${INativeListener *#INativeListener} Listener);
};

IMonitoring Properties

Connected

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

Returns true if it is currently connected to the USB device.

ConnectedDevice

readonly ConnectedDevice: ${IDevice};
${IDevice} ConnectedDevice { get; }
${IDevicePtr#IDevice} ConnectedDevice;  // get 

Returns the device this monitor object is currently connected to, or null if it is not connected.

UsbMonitor

readonly UsbMonitor: ${IUsbMonitor};
${IUsbMonitor} UsbMonitor { get; }
${IUsbMonitorPtr#IUsbMonitor} UsbMonitor;  // get 

Returns the reference to the main UsbMonitor object.

IMonitoring Methods

Connect

Connect(Device?: ${IDevice}, HeadersOnly?: boolean): void;
void Connect(${IDevice} Device, bool HeadersOnly);
HRESULT Connect(_variant_t Device, _variant_t HeadersOnly);
Device
Optional reference to the device to monitor. If missing, a session connects to the next connected USB device.
HeadersOnly
true to only process packet headers, false to process full packets. Default is false if parameter is omitted.

Connect to the USB device.

Disconnect

Disconnect(): void;
void Disconnect();
HRESULT Disconnect();

Disconnect from the USB device.

AddNativeListener

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT AddNativeListener(${INativeListener *#INativeListener} Listener);
Listener
Pointer to native listener client provides. Can be used only by a native code. Please see MFCSample for more details.

Add new native listener.

RemoveNativeListener

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT RemoveNativeListener(${INativeListener *#INativeListener} Listener);
Listener
Pointer to native listener client provides. Can be used only by a native code. Please see MFCSample for more details.

Remove native listener.