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

_IMonitoringEvents Interface

An event source interface for managed and scripting clients.

You do not explicitly implement this interface. It is usually implemented by the language runtime. You register the so-called “events”, one for each method of this interface to handle specific monitored requests.

This interface is used by the managed and scripting clients. The language runtime usually uses the methods of this interface automatically, allowing the client to register the events, callbacks or delegates, which are called when the USB Monitoring Control library fires these events. There is a proprietary interface in each managed language to connect to event sources. You will see Microsoft C# examples in this documentation, for other languages, please consult their documentation for a proper syntax to handle events.

Declaration

// This interface is not available in scripting environment
public interface _IMonitoringEvents
{

    // Methods
    void ${OnClassEndpoint}(DateTime time,
        byte[] array,
        byte RequestTypeReservedBits,
        byte Request,
        ushort Value,
        ushort Index);
    void ${OnClassInterface}(DateTime time,
        byte[] array,
        byte RequestTypeReservedBits,
        byte Request,
        ushort Value,
        ushort Index);
    void ${OnClassOther}(DateTime time,
        byte[] array,
        byte RequestTypeReservedBits,
        byte Request,
        ushort Value);
    void ${OnClearFeatureToDevice}(DateTime time,
        byte[] array,
        ushort FeatureSelector);
    void ${OnClearFeatureToEndpoint}(DateTime time,
        byte[] array,
        ushort FeatureSelector,
        ushort Index);
    void ${OnClearFeatureToInterface}(DateTime time,
        byte[] array,
        ushort FeatureSelector,
        ushort Index);
    void ${OnClearFeatureToOther}(DateTime time,
        byte[] array,
        ushort FeatureSelector);
    void ${OnConnection}(DateTime time,
        ${ConnectionState} cs,
        string Name);
    void ${OnControlTransfer}(DateTime time,
        byte[] array,
        uint payloadOffset,
        uint payloadSize);
    void ${OnGetConfiguration}(DateTime time, byte[] array);
    void ${OnGetCurrentFrameNumber}(DateTime time,
        byte[] array,
        uint FrameNumber);
    void ${OnGetDescriptorFromDevice}(DateTime time,
        byte[] array,
        byte Index,
        byte DescriptorType,
        ushort LanguageId);
    void ${OnGetDescriptorFromEndpoint}(DateTime time,
        byte[] array,
        byte Index,
        byte DescriptorType,
        ushort LanguageId);
    void ${OnGetDescriptorFromInterface}(DateTime time,
        byte[] array,
        byte Index,
        byte DescriptorType,
        ushort LanguageId);
    void ${OnGetFrameLength}(DateTime time,
        byte[] array,
        uint FrameLength,
        uint FrameNumber);
    void ${OnGetInterface}(DateTime time, byte[] array, ushort Interface);
    void ${OnGetStatusFromDevice}(DateTime time, byte[] array);
    void ${OnGetStatusFromEndpoint}(DateTime time, byte[] array, ushort Index);
    void ${OnGetStatusFromInterface}(DateTime time, byte[] array, ushort Index);
    void ${OnGetStatusFromOther}(DateTime time, byte[] array);
    void ${OnIsochTransfer}(DateTime time,
        byte[] array,
        uint nTransferFlags,
        uint StartFrame,
        uint NumberOfPackets,
        uint ErrorCount);
    void ${OnPacketDown}(DateTime time, byte[] array);
    void ${OnPacketUp}(DateTime time, byte[] array);
    void ${OnQueryID}(DateTime time);
    void ${OnQueryInterface}(DateTime time);
    void ${OnQueryText}(DateTime time);
    void ${OnReleaseFrameLengthControl}(DateTime time, byte[] array, ushort Interface);
    void ${OnResetPipe}(DateTime time, byte[] array, ulong PipeHandle);
    void ${OnSelectConfiguration}(DateTime time, byte[] array);
    void ${OnSelectInterface}(DateTime time,
        byte[] array,
        uint InterfaceNumber,
        byte AlternateSetting);
    void ${OnSetDescriptorToDevice}(DateTime time,
        byte[] array,
        byte Index,
        byte DescriptorType,
        ushort LanguageId);
    void ${OnSetDescriptorToEndpoint}(DateTime time,
        byte[] array,
        ushort FeatureSelector,
        ushort Index);
    void ${OnSetDescriptorToInterface}(DateTime time,
        byte[] array,
        ushort FeatureSelector,
        ushort Index,
        byte DescriptorType,
        ushort LanguageId);
    void ${OnSetFeatureToDevice}(DateTime time, byte[] array, ushort FeatureSelector);
    void ${OnSetFeatureToEndpoint}(DateTime time,
        byte[] array,
        ushort FeatureSelector,
        ushort Index);
    void ${OnSetFeatureToInterface}(DateTime time,
        byte[] array,
        ushort FeatureSelector,
        ushort Index);
    void ${OnSetFeatureToOther}(DateTime time,
        byte[] array,
        ushort FeatureSelector);
    void ${OnSetFrameLength}(DateTime time, byte[] array, int FrameLengthDelta);
    void ${OnSurpriseRemoval}(DateTime time);
    void ${OnTakeFrameLengthControl}(DateTime time, byte[] array, ushort Interface);
    void ${OnUrb}(DateTime time, byte[] array);
    void ${OnVendorDevice}(DateTime time,
        byte[] array,
        byte RequestTypeReservedBits,
        byte Request,
        ushort Value);
    void ${OnVendorEndpoint}(DateTime time,
        byte[] array,
        byte RequestTypeReservedBits,
        byte Request,
        ushort Value,
        ushort Index);
    void ${OnVendorInterface}(DateTime time,
        byte[] array,
        byte RequestTypeReservedBits,
        byte Request,
        ushort Value,
        ushort Index);
    void ${OnVendorOther}(DateTime time,
        byte[] array,
        byte RequestTypeReservedBits,
        byte Request,
        ushort Value);
    void ${OnAbortPipe}(DateTime time,
        byte[] array,
        ulong PipeHandle);
    void ${OnBulkOrInterruptTransfer}(DateTime time,
        byte[] array,
        uint payloadOffset,
        uint payloadSize);
    void ${OnClassDevice}(DateTime time,
        byte[] array,
        byte RequestTypeReservedBits,
        byte Request,
        ushort Value);
}
// This interface is not available in native environment

_IMonitoringEvents Methods

OnClassEndpoint

// This method is not available in scripting environment
void OnClassEndpoint(DateTime time,
    byte[] array,
    byte RequestTypeReservedBits,
    byte Request,
    ushort Value,
    ushort Index);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
RequestTypeReservedBits
Specifies a value, from 4 to 31 inclusive, that becomes part of the request type code in the USB-defined setup packet. This value is defined by USB for a class request or the vendor for a vendor request.
Request
Specifies the USB or vendor-defined request code for the device, interface, endpoint, or other device-defined target.
Value
Specifies a value, specific to Request, that becomes part of the USB-defined setup packet for the target. This value is defined by the creator of the code used in Request.
Index
Specifies the device-defined index, returned by a successful configuration request.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_CLASS_ENDPOINT is received. See _URB_CONTROL_VENDOR_OR_CLASS_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnClassInterface

// This method is not available in scripting environment
void OnClassInterface(DateTime time,
    byte[] array,
    byte RequestTypeReservedBits,
    byte Request,
    ushort Value,
    ushort Index);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
RequestTypeReservedBits
Specifies a value, from 4 to 31 inclusive, that becomes part of the request type code in the USB-defined setup packet. This value is defined by USB for a class request or the vendor for a vendor request.
Request
Specifies the USB or vendor-defined request code for the device, interface, endpoint, or other device-defined target.
Value
Specifies a value, specific to Request, that becomes part of the USB-defined setup packet for the target. This value is defined by the creator of the code used in Request.
Index
Specifies the device-defined index, returned by a successful configuration request.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_CLASS_INTERFACE is received. See _URB_CONTROL_VENDOR_OR_CLASS_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnClassOther

// This method is not available in scripting environment
void OnClassOther(DateTime time,
    byte[] array,
    byte RequestTypeReservedBits,
    byte Request,
    ushort Value);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
RequestTypeReservedBits
Specifies a value, from 4 to 31 inclusive, that becomes part of the request type code in the USB-defined setup packet. This value is defined by USB for a class request or the vendor for a vendor request.
Request
Specifies the USB or vendor-defined request code for the device, interface, endpoint, or other device-defined target.
Value
Specifies a value, specific to Request, that becomes part of the USB-defined setup packet for the target. This value is defined by the creator of the code used in Request.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_CLASS_OTHER is received. See _URB_CONTROL_VENDOR_OR_CLASS_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnClearFeatureToDevice

// This method is not available in scripting environment
void OnClearFeatureToDevice(DateTime time,
    byte[] array,
    ushort FeatureSelector);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FeatureSelector
Specifies the USB-defined feature code to be cleared or set. Using a feature code that is invalid, cannot be set, or cannot be cleared will cause the target to stall. The bus driver will copy the value in the FeatureSelector member to the wValue field of the setup packet.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_CLEAR_FEATURE_TO_DEVICE is received. See _URB_CONTROL_FEATURE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnClearFeatureToEndpoint

// This method is not available in scripting environment
void OnClearFeatureToEndpoint(DateTime time,
    byte[] array,
    ushort FeatureSelector,
    ushort Index);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FeatureSelector
Specifies the USB-defined feature code to be cleared or set. Using a feature code that is invalid, cannot be set, or cannot be cleared will cause the target to stall. The bus driver will copy the value in the FeatureSelector member to the wValue field of the setup packet.
Index
Specifies the device-defined index, returned by a successful configuration request. The bus driver will copy the value in the Index member to the wIndex field of the setup packet.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_CLEAR_FEATURE_TO_ENDPOINT is received. See _URB_CONTROL_FEATURE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnClearFeatureToInterface

// This method is not available in scripting environment
void OnClearFeatureToInterface(DateTime time,
    byte[] array,
    ushort FeatureSelector,
    ushort Index);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FeatureSelector
Specifies the USB-defined feature code to be cleared or set. Using a feature code that is invalid, cannot be set, or cannot be cleared will cause the target to stall. The bus driver will copy the value in the FeatureSelector member to the wValue field of the setup packet.
Index
Specifies the device-defined index, returned by a successful configuration request. The bus driver will copy the value in the Index member to the wIndex field of the setup packet.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_CLEAR_FEATURE_TO_INTERFACE is received. See _URB_CONTROL_FEATURE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnClearFeatureToOther

// This method is not available in scripting environment
void OnClearFeatureToOther(DateTime time,
    byte[] array,
    ushort FeatureSelector);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FeatureSelector
Specifies the USB-defined feature code to be cleared or set. Using a feature code that is invalid, cannot be set, or cannot be cleared will cause the target to stall. The bus driver will copy the value in the FeatureSelector member to the wValue field of the setup packet.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_CLEAR_FEATURE_TO_OTHER is received. See _URB_CONTROL_FEATURE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnConnection

// This method is not available in scripting environment
void OnConnection(DateTime time,
    ${ConnectionState} cs,
    string Name);
// This method is not available in native environment
time
The time of the event.
cs
The value of this parameter is DeviceConnected if device is connected and DeviceDisconnected if device is disconnected.
Name
Name of the device. You can get it by retrieving IDevice.Name at any time.

Called when the control attaches/detaches itself to/from the USB device. (it is fired when USB packet with EventType == EVENT_DEVICECONNECTED or EventType == EVENT_DEVICEDISCONNECTED is received).

OnControlTransfer

// This method is not available in scripting environment
void OnControlTransfer(DateTime time,
    byte[] array,
    uint payloadOffset,
    uint payloadSize);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
payloadOffset
Payload offset, in bytes.
payloadSize
Payload size, in bytes.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_CONTROL_TRANSFER is received. See _URB_CONTROL_DESCRIPTOR_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnGetConfiguration

// This method is not available in scripting environment
void OnGetConfiguration(DateTime time, byte[] array);
// This method is not available in native environment
time
The time of the event.
array
Packet data.

See _URB_BULK_OR_INTERRUPT_TRANSFER in MSDN for more details.

OnGetCurrentFrameNumber

// This method is not available in scripting environment
void OnGetCurrentFrameNumber(DateTime time,
    byte[] array,
    uint FrameNumber);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FrameNumber
Contains the current 32-bit frame number, on the USB bus, on return from the host controller driver.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_GET_CURRENT_FRAME_NUMBER is received. See _URB_GET_CURRENT_FRAME_NUMBER in MSDN for more details. The library decodes several parameters from this packet.

OnGetDescriptorFromDevice

// This method is not available in scripting environment
void OnGetDescriptorFromDevice(DateTime time,
    byte[] array,
    byte Index,
    byte DescriptorType,
    ushort LanguageId);
// This method is not available in native environment
time
The time of the event.
array
Original URB packet data.
Index
Specifies the device-defined index of the descriptor that is being retrieved or set.
DescriptorType
Indicates what type of descriptor is being retrieved or set. One of the following values must be specified: USB_DEVICE_DESCRIPTOR_TYPE, USB_CONFIGURATION_DESCRIPTOR_TYPE or USB_STRING_DESCRIPTOR_TYPE.
LanguageId
Specifies the language ID of the descriptor to be retrieved when USB_STRING_DESCRIPTOR_TYPE is set in DescriptorType. This member must be set to zero for any other value in DescriptorType.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE is received. See _URB_CONTROL_DESCRIPTOR_REQUEST for more details. The library decodes several parameters from this packet.

OnGetDescriptorFromEndpoint

// This method is not available in scripting environment
void OnGetDescriptorFromEndpoint(DateTime time,
    byte[] array,
    byte Index,
    byte DescriptorType,
    ushort LanguageId);
// This method is not available in native environment
time
The time of the event.
array
Original URB packet data.
Index
Specifies the device-defined index of the descriptor that is being retrieved or set.
DescriptorType
Indicates what type of descriptor is being retrieved or set. One of the following values must be specified: USB_DEVICE_DESCRIPTOR_TYPE, USB_CONFIGURATION_DESCRIPTOR_TYPE or USB_STRING_DESCRIPTOR_TYPE.
LanguageId
Specifies the language ID of the descriptor to be retrieved when USB_STRING_DESCRIPTOR_TYPE is set in DescriptorType. This member must be set to zero for any other value in DescriptorType.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_GET_DESCRIPTOR_FROM_ENDPOINT is received. See _URB_CONTROL_DESCRIPTOR_REQUEST for more details. The library decodes several parameters from this packet.

OnGetDescriptorFromInterface

// This method is not available in scripting environment
void OnGetDescriptorFromInterface(DateTime time,
    byte[] array,
    byte Index,
    byte DescriptorType,
    ushort LanguageId);
// This method is not available in native environment
time
The time of the event.
array
Original URB packet data.
Index
Specifies the device-defined index of the descriptor that is being retrieved or set.
DescriptorType
Indicates what type of descriptor is being retrieved or set. One of the following values must be specified: USB_DEVICE_DESCRIPTOR_TYPE, USB_CONFIGURATION_DESCRIPTOR_TYPE or USB_STRING_DESCRIPTOR_TYPE.
LanguageId
Specifies the language ID of the descriptor to be retrieved when USB_STRING_DESCRIPTOR_TYPE is set in DescriptorType. This member must be set to zero for any other value in DescriptorType.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE is received. See _URB_CONTROL_DESCRIPTOR_REQUEST for more details. The library decodes several parameters from this packet.

OnGetFrameLength

// This method is not available in scripting environment
void OnGetFrameLength(DateTime time,
    byte[] array,
    uint FrameLength,
    uint FrameNumber);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FrameLength
Contains the length of each bus frame in USB-defined bit times.
FrameNumber
Contains the earliest bus frame number that the frame length can be altered on return from the host controller driver.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_GET_FRAME_LENGTH is received. See _URB_GET_FRAME_LENGTH in MSDN for more details. The library decodes several parameters from this packet.

OnGetInterface

// This method is not available in scripting environment
void OnGetInterface(DateTime time, byte[] array, ushort Interface);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
Interface
Specifies the device-defined index of the interface descriptor being retrieved.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_GET_INTERFACE is received. See _URB_CONTROL_GET_INTERFACE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnGetStatusFromDevice

// This method is not available in scripting environment
void OnGetStatusFromDevice(DateTime time, byte[] array);
// This method is not available in native environment
time
The time of the event.
array
Packet data.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_GET_STATUS_FROM_DEVICE is received. See _URB_CONTROL_GET_STATUS_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnGetStatusFromEndpoint

// This method is not available in scripting environment
void OnGetStatusFromEndpoint(DateTime time, byte[] array, ushort Index);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
Index
Specifies the device-defined index, returned by a successful configuration request.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_GET_STATUS_FROM_ENDPOINT is received. See _URB_CONTROL_GET_STATUS_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnGetStatusFromInterface

// This method is not available in scripting environment
void OnGetStatusFromInterface(DateTime time, byte[] array, ushort Index);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
Index
Specifies the device-defined index, returned by a successful configuration request.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_GET_STATUS_FROM_INTERFACE is received. See _URB_CONTROL_GET_STATUS_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnGetStatusFromOther

// This method is not available in scripting environment
void OnGetStatusFromOther(DateTime time, byte[] array);
// This method is not available in native environment
time
The time of the event.
array
Packet data.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_GET_STATUS_FROM_OTHER is received. See _URB_CONTROL_GET_STATUS_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnIsochTransfer

// This method is not available in scripting environment
void OnIsochTransfer(DateTime time,
    byte[] array,
    uint nTransferFlags,
    uint StartFrame,
    uint NumberOfPackets,
    uint ErrorCount);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
nTransferFlags
Specifies zero, one, or a combination of the following flags: USBD_TRANSFER_DIRECTION_IN, USBD_SHORT_TRANSFER_OK, USBD_START_ISO_TRANSFER_ASAP.
StartFrame
Specifies the frame number the transfer should begin on. This variable must be within a system-defined range of the current frame. The range is specified by the constant USBD_ISO_START_FRAME_RANGE. If START_ISO_TRANSFER_ASAP is set in TransferFlags, this member contains the frame number that the transfer began on, when the request is returned by the host controller driver. Otherwise, this member must contain the frame number that this transfer will begin on.
NumberOfPackets
Specifies the number of packets described by the variable-length array member IsoPacket.
ErrorCount
Contains the number of packets that completed with an error condition on return from the host controller driver.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_ISOCH_TRANSFER is received. See _URB_ISOCH_TRANSFER and USBD_ISO_PACKET_DESCRIPTOR in MSDN for more details. The library decodes several parameters from this packet.

OnPacketDown

// This method is not available in scripting environment
void OnPacketDown(DateTime time, byte[] array);
// This method is not available in native environment
time
The time of the event.
array
Packet data.

Called when packet is going down.

OnPacketUp

// This method is not available in scripting environment
void OnPacketUp(DateTime time, byte[] array);
// This method is not available in native environment
time
The time of the event.
array
Packet data.

Called when packet is going up.

OnQueryID

// This method is not available in scripting environment
void OnQueryID(DateTime time);
// This method is not available in native environment
time
The time of the event.

Called when id is queried by EVENT_DEVICEQUERYID.

OnQueryInterface

// This method is not available in scripting environment
void OnQueryInterface(DateTime time);
// This method is not available in native environment
time
The time of the event.

Called when interface is queried by EVENT_DEVICEQUERYINTERFACE.

OnQueryText

// This method is not available in scripting environment
void OnQueryText(DateTime time);
// This method is not available in native environment
time
The time of the event.

Called when text is queried by EVENT_DEVICEQUERYTEXT.

OnReleaseFrameLengthControl

// This method is not available in scripting environment
void OnReleaseFrameLengthControl(DateTime time, byte[] array, ushort Interface);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
Interface
Specifies the device-defined index of the interface descriptor being retrieved.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_RELEASE_FRAME_LENGTH_CONTROL is received. See _URB_CONTROL_GET_INTERFACE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnResetPipe

// This method is not available in scripting environment
void OnResetPipe(DateTime time, byte[] array, ulong PipeHandle);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
PipeHandle
Specifies an opaque handle to the bulk or interrupt pipe. The host controller driver returns this handle when the client driver selects the device configuration with a URB of type URB_FUNCTION_SELECT_CONFIGURATION or when the client driver changes the settings for an interface with a URB of type URB_FUNCTION_SELECT_INTERFACE.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_RESET_PIPE is received. See _URB_PIPE_REQUEST in MSDN for more details.

OnSelectConfiguration

// This method is not available in scripting environment
void OnSelectConfiguration(DateTime time, byte[] array);
// This method is not available in native environment
time
The time of the event.
array
Packet data.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_SELECT_CONFIGURATION is received. See _URB_SELECT_CONFIGURATION in MSDN for more details.

OnSelectInterface

// This method is not available in scripting environment
void OnSelectInterface(DateTime time,
    byte[] array,
    uint InterfaceNumber,
    byte AlternateSetting);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
InterfaceNumber
Specifies the device-defined index identifier for this interface.
AlternateSetting
Specifies a device-defined index identifier that indicates which alternate setting this interface is using, should use, or describes.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_SELECT_INTERFACE is received. See _URB_SELECT_INTERFACE in MSDN for more details. The library decodes several parameters from this packet.

OnSetDescriptorToDevice

// This method is not available in scripting environment
void OnSetDescriptorToDevice(DateTime time,
    byte[] array,
    byte Index,
    byte DescriptorType,
    ushort LanguageId);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
Index
Specifies the device-defined index of the descriptor that is being retrieved or set.
DescriptorType
Indicates what type of descriptor is being retrieved or set. One of the following values must be specified: USB_DEVICE_DESCRIPTOR_TYPE, USB_CONFIGURATION_DESCRIPTOR_TYPE, USB_STRING_DESCRIPTOR_TYPE.
LanguageId
Specifies the language ID of the descriptor to be retrieved when USB_STRING_DESCRIPTOR_TYPE is set in DescriptorType. This member must be set to zero for any other value in DescriptorType.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_SET_DESCRIPTOR_TO_DEVICE is received. See _URB_CONTROL_DESCRIPTOR_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnSetDescriptorToEndpoint

// This method is not available in scripting environment
void OnSetDescriptorToEndpoint(DateTime time,
    byte[] array,
    ushort FeatureSelector,
    ushort Index);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FeatureSelector
Specifies the USB-defined feature code to be cleared or set. Using a feature code that is invalid, cannot be set, or cannot be cleared will cause the target to stall. The bus driver will copy the value in the FeatureSelector member to the wValue field of the setup packet.
Index
Specifies the device-defined index, returned by a successful configuration request, if the request is for an endpoint or interface. Otherwise, Index must be zero. The bus driver will copy the value in the Index member to the wIndex field of the setup packet.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_SET_DESCRIPTOR_TO_ENDPOINT is received. See _URB_CONTROL_FEATURE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnSetDescriptorToInterface

// This method is not available in scripting environment
void OnSetDescriptorToInterface(DateTime time,
    byte[] array,
    ushort FeatureSelector,
    ushort Index,
    byte DescriptorType,
    ushort LanguageId);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FeatureSelector
Specifies the USB-defined feature code to be cleared or set. Using a feature code that is invalid, cannot be set, or cannot be cleared will cause the target to stall. The bus driver will copy the value in the FeatureSelector member to the wValue field of the setup packet.
Index
Specifies the device-defined index, returned by a successful configuration request, if the request is for an endpoint or interface. Otherwise, Index must be zero. The bus driver will copy the value in the Index member to the wIndex field of the setup packet.
DescriptorType
Indicates what type of descriptor is being retrieved or set. One of the following values must be specified: USB_DEVICE_DESCRIPTOR_TYPE, USB_CONFIGURATION_DESCRIPTOR_TYPE, USB_STRING_DESCRIPTOR_TYPE.
LanguageId
Specifies the language ID of the descriptor to be retrieved when USB_STRING_DESCRIPTOR_TYPE is set in DescriptorType. This member must be set to zero for any other value in DescriptorType.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_SET_DESCRIPTOR_TO_INTERFACE is received. See _URB_CONTROL_FEATURE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnSetFeatureToDevice

// This method is not available in scripting environment
void OnSetFeatureToDevice(DateTime time, byte[] array, ushort FeatureSelector);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FeatureSelector
Specifies the USB-defined feature code to be cleared or set. Using a feature code that is invalid, cannot be set, or cannot be cleared will cause the target to stall. The bus driver will copy the value in the FeatureSelector member to the wValue field of the setup packet.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_SET_FEATURE_TO_DEVICE is received. See _URB_CONTROL_FEATURE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnSetFeatureToEndpoint

// This method is not available in scripting environment
void OnSetFeatureToEndpoint(DateTime time,
    byte[] array,
    ushort FeatureSelector,
    ushort Index);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FeatureSelector
Specifies the USB-defined feature code to be cleared or set. Using a feature code that is invalid, cannot be set, or cannot be cleared will cause the target to stall. The bus driver will copy the value in the FeatureSelector member to the wValue field of the setup packet.
Index
Specifies the device-defined index, returned by a successful configuration request. The bus driver will copy the value in the Index member to the wIndex field of the setup packet.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_SET_FEATURE_TO_ENDPOINT is received. See _URB_CONTROL_FEATURE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnSetFeatureToInterface

// This method is not available in scripting environment
void OnSetFeatureToInterface(DateTime time,
    byte[] array,
    ushort FeatureSelector,
    ushort Index);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FeatureSelector
Specifies the USB-defined feature code to be cleared or set. Using a feature code that is invalid, cannot be set, or cannot be cleared will cause the target to stall. The bus driver will copy the value in the FeatureSelector member to the wValue field of the setup packet.
Index
Specifies the device-defined index, returned by a successful configuration request. The bus driver will copy the value in the Index member to the wIndex field of the setup packet.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_SET_FEATURE_TO_INTERFACE is received. See _URB_CONTROL_FEATURE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnSetFeatureToOther

// This method is not available in scripting environment
void OnSetFeatureToOther(DateTime time,
    byte[] array,
    ushort FeatureSelector);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FeatureSelector
Specifies the USB-defined feature code to be cleared or set. Using a feature code that is invalid, cannot be set, or cannot be cleared will cause the target to stall. The bus driver will copy the value in the FeatureSelector member to the wValue field of the setup packet.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_SET_FEATURE_TO_OTHER is received. See _URB_CONTROL_FEATURE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnSetFrameLength

// This method is not available in scripting environment
void OnSetFrameLength(DateTime time, byte[] array, int FrameLengthDelta);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
FrameLengthDelta
Specifies the number of USB-defined bit times to be added or subtracted from the current frame length. The maximum increase or decrease per URB is 1.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_SET_FRAME_LENGTH is received. See _URB_SET_FRAME_LENGTH in MSDN for more details. The library decodes several parameters from this packet.

OnSurpriseRemoval

// This method is not available in scripting environment
void OnSurpriseRemoval(DateTime time);
// This method is not available in native environment
time
The time of the event.

Called when device is removed by EVENT_DEVICESURPRISEREMOVAL.

OnTakeFrameLengthControl

// This method is not available in scripting environment
void OnTakeFrameLengthControl(DateTime time, byte[] array, ushort Interface);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
Interface
Specifies the device-defined index of the interface descriptor being retrieved.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_TAKE_FRAME_LENGTH_CONTROL is received. See _URB_CONTROL_GET_INTERFACE_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnUrb

// This method is not available in scripting environment
void OnUrb(DateTime time, byte[] array);
// This method is not available in native environment
time
The time of the event.
array
Packet data.

Called when URB is transmitted. See USBPACKET_URB for more information.

OnVendorDevice

// This method is not available in scripting environment
void OnVendorDevice(DateTime time,
    byte[] array,
    byte RequestTypeReservedBits,
    byte Request,
    ushort Value);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
RequestTypeReservedBits
Specifies a value, from 4 to 31 inclusive, that becomes part of the request type code in the USB-defined setup packet. This value is defined by USB for a class request or the vendor for a vendor request.
Request
Specifies the USB or vendor-defined request code for the device, interface, endpoint, or other device-defined target.
Value
Specifies a value, specific to Request, that becomes part of the USB-defined setup packet for the target. This value is defined by the creator of the code used in Request.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_VENDOR_DEVICE is received. See _URB_CONTROL_VENDOR_OR_CLASS_REQUEST in MSDN for more information. The library decodes several parameters from this packet.

OnVendorEndpoint

// This method is not available in scripting environment
void OnVendorEndpoint(DateTime time,
    byte[] array,
    byte RequestTypeReservedBits,
    byte Request,
    ushort Value,
    ushort Index);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
RequestTypeReservedBits
Specifies a value, from 4 to 31 inclusive, that becomes part of the request type code in the USB-defined setup packet. This value is defined by USB for a class request or the vendor for a vendor request.
Request
Specifies the USB or vendor-defined request code for the device, interface, endpoint, or other device-defined target.
Value
Specifies a value, specific to Request, that becomes part of the USB-defined setup packet for the target. This value is defined by the creator of the code used in Request.
Index
Specifies the device-defined index, returned by a successful configuration request.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_VENDOR_ENDPOINT is received. See _URB_CONTROL_VENDOR_OR_CLASS_REQUEST in MSDN for more information. The library decodes several parameters from this packet.

OnVendorInterface

// This method is not available in scripting environment
void OnVendorInterface(DateTime time,
    byte[] array,
    byte RequestTypeReservedBits,
    byte Request,
    ushort Value,
    ushort Index);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
RequestTypeReservedBits
Specifies a value, from 4 to 31 inclusive, that becomes part of the request type code in the USB-defined setup packet. This value is defined by USB for a class request or the vendor for a vendor request.
Request
Specifies the USB or vendor-defined request code for the device, interface, endpoint, or other device-defined target.
Value
Specifies a value, specific to Request, that becomes part of the USB-defined setup packet for the target. This value is defined by the creator of the code used in Request.
Index
Specifies the device-defined index, returned by a successful configuration request.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_VENDOR_INTERFACE is received. See _URB_CONTROL_VENDOR_OR_CLASS_REQUEST in MSDN for more information. The library decodes several parameters from this packet.

OnVendorOther

// This method is not available in scripting environment
void OnVendorOther(DateTime time,
    byte[] array,
    byte RequestTypeReservedBits,
    byte Request,
    ushort Value);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
RequestTypeReservedBits
Specifies a value, from 4 to 31 inclusive, that becomes part of the request type code in the USB-defined setup packet. This value is defined by USB for a class request or the vendor for a vendor request.
Request
Specifies the USB or vendor-defined request code for the device, interface, endpoint, or other device-defined target.
Value
Specifies a value, specific to Request, that becomes part of the USB-defined setup packet for the target. This value is defined by the creator of the code used in Request.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_VENDOR_OTHER is received. See _URB_CONTROL_VENDOR_OR_CLASS_REQUEST in MSDN for more information. The library decodes several parameters from this packet.

OnAbortPipe

// This method is not available in scripting environment
void OnAbortPipe(DateTime time,
    byte[] array,
    ulong PipeHandle);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
PipeHandle
Specifies an opaque handle to the bulk or interrupt pipe. The host controller driver returns this handle when the client driver selects the device configuration with a URB of type URB_FUNCTION_SELECT_CONFIGURATION or when the client driver changes the settings for an interface with a URB of type URB_FUNCTION_SELECT_INTERFACE.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_ABORT_PIPE is received. See _URB_PIPE_REQUEST in MSDN for more details.

OnBulkOrInterruptTransfer

// This method is not available in scripting environment
void OnBulkOrInterruptTransfer(DateTime time,
    byte[] array,
    uint payloadOffset,
    uint payloadSize);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
payloadOffset
Payload offset, in bytes.
payloadSize
Payload size, in bytes.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER is received. See _URB_BULK_OR_INTERRUPT_TRANSFER in MSDN for more details.

OnClassDevice

// This method is not available in scripting environment
void OnClassDevice(DateTime time,
    byte[] array,
    byte RequestTypeReservedBits,
    byte Request,
    ushort Value);
// This method is not available in native environment
time
The time of the event.
array
Packet data.
RequestTypeReservedBits
Specifies a value, from 4 to 31 inclusive, that becomes part of the request type code in the USB-defined setup packet. This value is defined by USB for a class request or the vendor for a vendor request.
Request
Specifies the USB or vendor-defined request code for the device, interface, endpoint, or other device-defined target.
Value
Specifies a value, specific to Request, that becomes part of the USB-defined setup packet for the target. This value is defined by the creator of the code used in Request.

Fired when URB packet with urb.UrbHeader.Function == URB_FUNCTION_CLASS_DEVICE is received. See _URB_CONTROL_VENDOR_OR_CLASS_REQUEST in MSDN for more details. The library decodes several parameters from this packet.