USB Monitoring Control - TODO
Docs

INativeListener Interface

The high-performance event interface for native (C/C++) listeners.

This is a local interface, which means that it can only be used by the in-proc binary compatible clients, written, for example, in unmanaged C++ language.

Register your native listener with a call to IMonitoring.AddNativeListener method call. Using native listener interface, you will be able to match the performance of the HHD Software USB Monitor application.

You must implement this interface in your native code to be able to receive monitored events. The USB Monitoring Control library uses the methods of this interface to notify your code about monitored events.

Declaration

// This interface is not available in scripting environment
// This interface is not available in managed environment
struct INativeListener : IUnknown
{
    // Methods
    HRESULT ${OnClearFeatureToEndpoint}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short FeatureSelector,
        unsigned short nIndex);
    HRESULT ${OnClearFeatureToInterface}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short FeatureSelector,
        unsigned short nIndex);
    HRESULT ${OnClearFeatureToOther}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short FeatureSelector);
    HRESULT ${OnConnection}(FILETIME * fTime,
        long bConnected,
        wchar_t * DeviceName);
    HRESULT ${OnControlTransfer}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        void * SetupPacket,
        unsigned long SetupPacketSize);
    HRESULT ${OnGetConfiguration}(FILETIME * fTime,
        void * Data,
        unsigned long Size);
    HRESULT ${OnGetCurrentFrameNumber}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned long FrameNumber);
    HRESULT ${OnGetDescriptorFromDevice}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char Index,
        unsigned char DescriptorType,
        unsigned short LanguageId);
    HRESULT ${OnGetDescriptorFromEndpoint}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char Index,
        unsigned char DescriptorType,
        unsigned short LanguageId);
    HRESULT ${OnGetDescriptorFromInterface}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char Index,
        unsigned char DescriptorType,
        unsigned short LanguageId);
    HRESULT ${OnGetFrameLength}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned long FrameLength,
        unsigned long FrameNumber);
    HRESULT ${OnGetInterface}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short Interface);
    HRESULT ${OnGetStatusFromDevice}(FILETIME * fTime,
        void * pData,
        unsigned long Size);
    HRESULT ${OnGetStatusFromEndpoint}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short Index);
    HRESULT ${OnGetStatusFromInterface}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short Index);
    HRESULT ${OnGetStatusFromOther}(FILETIME * fTime,
        void * pData,
        unsigned long Size);
    HRESULT ${OnIsochTransfer}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned long nTransferFlags,
        unsigned long StartFrame,
        unsigned long NumberOfPackets,
        unsigned long ErrorCount);
    HRESULT ${OnPacketDown}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        long * bStopParsing);
    HRESULT ${OnPacketUp}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        long * bStopParsing);
    HRESULT ${OnQueryID}(FILETIME * fTime);
    HRESULT ${OnQueryInterface}(FILETIME * fTime);
    HRESULT ${OnQueryText}(FILETIME * fTime);
    HRESULT ${OnReleaseFrameLengthControl}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short Interface);
    HRESULT ${OnResetPipe}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned __int64 PipeHandle);
    HRESULT ${OnSelectConfiguration}(FILETIME * fTime,
        void * pData,
        unsigned long Size);
    HRESULT ${OnSelectInterface}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned long InterfaceNumber,
        unsigned long AlternateSetting);
    HRESULT ${OnSetDescriptorToDevice}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char Index,
        unsigned char DescriptorType,
        unsigned long LanguageId);
    HRESULT ${OnSetDescriptorToEndpoint}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char Index,
        unsigned char DescriptorType,
        unsigned long LanguageId);
    HRESULT ${OnSetDescriptorToInterface}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char Index,
        unsigned char DescriptorType,
        unsigned long LanguageId);
    HRESULT ${OnSetFeatureToDevice}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short FeatureSelector);
    HRESULT ${OnSetFeatureToEndpoint}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short FeatureSelector,
        unsigned short Index);
    HRESULT ${OnSetFeatureToInterface}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short FeatureSelector,
        unsigned short Index);
    HRESULT ${OnSetFeatureToOther}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short FeatureSelector);
    HRESULT ${OnSetFrameLength}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        long FrameLengthDelta);
    HRESULT ${OnSurpriseRemoval}(FILETIME * fTime);
    HRESULT ${OnTakeFrameLengthControl}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short Interface);
    HRESULT ${OnUrb}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        long * bStopParsing);
    HRESULT ${OnVendorDevice}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char RequestTypeReservedBits,
        unsigned char Request,
        unsigned short Value);
    HRESULT ${OnVendorEndpoint}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char RequestTypeReservedBits,
        unsigned char Request,
        unsigned short Value,
        unsigned short Index);
    HRESULT ${OnVendorInterface}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char RequestTypeReservedBits,
        unsigned char Request,
        unsigned short Value,
        unsigned short Index);
    HRESULT ${OnVendorOther}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char RequestTypeReservedBits,
        unsigned char Request,
        unsigned short Value);
    HRESULT ${ProcessRAWBuffer}(void * pData, unsinged long Size, long * bStopParsing);
    HRESULT ${OnAbortPipe}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned __int64 PipeHandle);
    HRESULT ${OnBulkOrInterruptTransfer}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        void * Payload,
        unsigned long PayloadSize);
    HRESULT ${OnClassDevice}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char RequestTypeReservedBits,
        unsigned char Request,
        unsigned short Value);
    HRESULT ${OnClassEndpoint}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char RequestTypeReservedBits,
        unsigned char Request,
        unsigned short Value,
        unsigned short Index);
    HRESULT ${OnClassInterface}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char RequestTypeReservedBits,
        unsigned char Request,
        unsigned short Value,
        unsigned short Index);
    HRESULT ${OnClassOther}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned char RequestTypeReservedBits,
        unsigned char Request,
        unsigned short Value);
    HRESULT ${OnClearFeatureToDevice}(FILETIME * fTime,
        void * pData,
        unsigned long Size,
        unsigned short FeatureSelector);
};

INativeListener Methods

OnClearFeatureToEndpoint

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnClearFeatureToEndpoint(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short FeatureSelector,
    unsigned short nIndex);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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.
nIndex
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
// This method is not available in managed environment
HRESULT OnClearFeatureToInterface(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short FeatureSelector,
    unsigned short nIndex);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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.
nIndex
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
// This method is not available in managed environment
HRESULT OnClearFeatureToOther(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short FeatureSelector);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnConnection(FILETIME * fTime,
    long bConnected,
    wchar_t * DeviceName);
fTime
The time of the event.
bConnected
The value of this parameter is TRUE if device is connected and FALSE if device is disconnected.
DeviceName
Name of the device. You can also get it by retrieving IDevice.Name at any time.

Called when the control attaches/detaches itself to/from the USB device.

OnControlTransfer

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnControlTransfer(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    void * SetupPacket,
    unsigned long SetupPacketSize);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload data.
SetupPacket
Pointer to the setup packet.
SetupPacketSize
Size of the setup packet.

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
// This method is not available in managed environment
HRESULT OnGetConfiguration(FILETIME * fTime,
    void * Data,
    unsigned long Size);
fTime
The time of the event.
Data
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload data.

See _URB_BULK_OR_INTERRUPT_TRANSFER in MSDN for more details.

OnGetCurrentFrameNumber

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnGetCurrentFrameNumber(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned long FrameNumber);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnGetDescriptorFromDevice(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char Index,
    unsigned char DescriptorType,
    unsigned short LanguageId);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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_GET_DESCRIPTOR_FROM_DEVICE is received. See _URB_CONTROL_DESCRIPTOR_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnGetDescriptorFromEndpoint

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnGetDescriptorFromEndpoint(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char Index,
    unsigned char DescriptorType,
    unsigned short LanguageId);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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_GET_DESCRIPTOR_FROM_ENDPOINT is received. See _URB_CONTROL_DESCRIPTOR_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnGetDescriptorFromInterface

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnGetDescriptorFromInterface(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char Index,
    unsigned char DescriptorType,
    unsigned short LanguageId);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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_GET_DESCRIPTOR_FROM_INTERFACE is received. See _URB_CONTROL_DESCRIPTOR_REQUEST in MSDN for more details. The library decodes several parameters from this packet.

OnGetFrameLength

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnGetFrameLength(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned long FrameLength,
    unsigned long FrameNumber);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnGetInterface(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short Interface);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnGetStatusFromDevice(FILETIME * fTime,
    void * pData,
    unsigned long Size);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnGetStatusFromEndpoint(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short Index);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnGetStatusFromInterface(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short Index);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnGetStatusFromOther(FILETIME * fTime,
    void * pData,
    unsigned long Size);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnIsochTransfer(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned long nTransferFlags,
    unsigned long StartFrame,
    unsigned long NumberOfPackets,
    unsigned long ErrorCount);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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 for more details. The library decodes several parameters from this packet.

OnPacketDown

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnPacketDown(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    long * bStopParsing);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload data.
bStopParsing
Set this parameter to TRUE if you don't need USBMC to parse this packet any more. That means that USBMC will not call methods like OnUrb / OnGetDescriptorFromDevice / OnGetDescriptorFromEndpoint for this packet. That could be used for optimization if you manually parse URB packet.

Called when packet is going down.

OnPacketUp

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnPacketUp(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    long * bStopParsing);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload data.
bStopParsing
Set this parameter to TRUE if you don't need USBMC to parse this packet any more. That means that USBMC will not call methods like OnUrb / OnGetDescriptorFromDevice / OnGetDescriptorFromEndpoint for this packet. That could be used for optimization if you manually parse URB packet.

Called when packet is going up.

OnQueryID

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnQueryID(FILETIME * fTime);
fTime
The time of the event.

Called when id is queried with EVENT_DEVICEQUERYID.

OnQueryInterface

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnQueryInterface(FILETIME * fTime);
fTime
The time of the event.

Called when id is queried with EVENT_DEVICEQUERYINTERFACE.

OnQueryText

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnQueryText(FILETIME * fTime);
fTime
The time of the event.

Called when id is queried with EVENT_DEVICEQUERYTEXT.

OnReleaseFrameLengthControl

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnReleaseFrameLengthControl(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short Interface);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnResetPipe(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned __int64 PipeHandle);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnSelectConfiguration(FILETIME * fTime,
    void * pData,
    unsigned long Size);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload data.

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

OnSelectInterface

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnSelectInterface(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned long InterfaceNumber,
    unsigned long AlternateSetting);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnSetDescriptorToDevice(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char Index,
    unsigned char DescriptorType,
    unsigned long LanguageId);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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 for more details. The library decodes several parameters from this packet.

OnSetDescriptorToEndpoint

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnSetDescriptorToEndpoint(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char Index,
    unsigned char DescriptorType,
    unsigned long LanguageId);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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_ENDPOINT is received. See _URB_CONTROL_DESCRIPTOR_REQUEST for more details. The library decodes several parameters from this packet.

OnSetDescriptorToInterface

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnSetDescriptorToInterface(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char Index,
    unsigned char DescriptorType,
    unsigned long LanguageId);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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_INTERFACE is received. See _URB_CONTROL_DESCRIPTOR_REQUEST for more details. The library decodes several parameters from this packet.

OnSetFeatureToDevice

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnSetFeatureToDevice(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short FeatureSelector);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnSetFeatureToEndpoint(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short FeatureSelector,
    unsigned short Index);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnSetFeatureToInterface(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short FeatureSelector,
    unsigned short Index);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnSetFeatureToOther(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short FeatureSelector);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnSetFrameLength(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    long FrameLengthDelta);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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 for more details. The library decodes several parameters from this packet.

OnSurpriseRemoval

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnSurpriseRemoval(FILETIME * fTime);

fTime

Called when device is removed with EVENT_DEVICESURPRISEREMOVAL.

OnTakeFrameLengthControl

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnTakeFrameLengthControl(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short Interface);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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 for more details. The library decodes several parameters from this packet.

OnUrb

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnUrb(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    long * bStopParsing);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload data.
bStopParsing
Set this to TRUE if you don't need USBMC to parse this packet any more. That means that USBMC will not call methods like OnGetDescriptorFromDevice / OnGetDescriptorFromEndpoint for this packet. That could be used for optimization if you manually parse URB packet.

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

OnVendorDevice

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnVendorDevice(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char RequestTypeReservedBits,
    unsigned char Request,
    unsigned short Value);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnVendorEndpoint(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char RequestTypeReservedBits,
    unsigned char Request,
    unsigned short Value,
    unsigned short Index);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnVendorInterface(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char RequestTypeReservedBits,
    unsigned char Request,
    unsigned short Value,
    unsigned short Index);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnVendorOther(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char RequestTypeReservedBits,
    unsigned char Request,
    unsigned short Value);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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.

ProcessRAWBuffer

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT ProcessRAWBuffer(void * pData, unsinged long Size, long * bStopParsing);
pData
Pointer to a raw buffer that may contain multiple packets. Use it to manually parse all packets. See MFCSample for more details.
Size
Total size of the raw buffer.
bStopParsing
Set this to TRUE if you don't need USBMC to parse this buffer any more. That means that USBMC will not call methods like OnPacketUp, OnPacketDown, OnUrb, OnGetDescriptorFromDevice, OnGetDescriptorFromEndpoint for all packets that are contained in buffer. That could be used for optimization if you manually parse this buffer.

Called by the control to process the monitored events at the lowest possible level.

OnAbortPipe

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnAbortPipe(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned __int64 PipeHandle);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnBulkOrInterruptTransfer(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    void * Payload,
    unsigned long PayloadSize);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload data.
Payload
Pointer to payload that trails after all headers. Use it to manually parse all fields. See MFCSample for more details. Note that in headers-only mode this pointer is invalid.
PayloadSize
The size of the payload. This parameter is zero when in headers-only mode.

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

OnClassDevice

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnClassDevice(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char RequestTypeReservedBits,
    unsigned char Request,
    unsigned short Value);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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.

OnClassEndpoint

// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT OnClassEndpoint(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char RequestTypeReservedBits,
    unsigned char Request,
    unsigned short Value,
    unsigned short Index);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnClassInterface(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char RequestTypeReservedBits,
    unsigned char Request,
    unsigned short Value,
    unsigned short Index);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnClassOther(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned char RequestTypeReservedBits,
    unsigned char Request,
    unsigned short Value);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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
// This method is not available in managed environment
HRESULT OnClearFeatureToDevice(FILETIME * fTime,
    void * pData,
    unsigned long Size,
    unsigned short FeatureSelector);
fTime
The time of the event.
pData
Pointer to a USBPACKET. Use it to manually parse all fields. See MFCSample for more details.
Size
Total size of USBPACKET and all payload 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.