Class for dynamic loading of winusb.
Definition at line 38 of file xsens/xswinusb.h.
#include <xSens_MT4/xcommunication/include/xsens/xswinusb.h>
Classes | |
struct | _WINUSB_API |
Public Member Functions | |
XsWinUsb (void) | |
~XsWinUsb (void) | |
XsWinUsb (void) | |
~XsWinUsb (void) | |
Public Attributes | |
WinUSB_Initialize | Initialize |
Creates/opens a WinUsb interface handle from the device list. More... | |
WinUSB_Free | Free |
Frees a WinUsb interface handle. More... | |
WinUSB_GetAssociatedInterface | GetAssociatedInterface |
Retrieves a handle for an associated interface. More... | |
WinUSB_GetDescriptor | GetDescriptor |
Gets the requested descriptor. This is a synchronous operation. More... | |
WinUSB_QueryInterfaceSettings | QueryInterfaceSettings |
Retrieves the interface descriptor for the specified alternate interface settings for a particular interface handle. More... | |
WinUSB_QueryDeviceInformation | QueryDeviceInformation |
Retrieves information about the physical device that is associated with a WinUSB handle. More... | |
WinUSB_SetCurrentAlternateSetting | SetCurrentAlternateSetting |
Sets the alternate setting of an interface. Sets the active bAlternateSetting for the current/default interface. More... | |
WinUSB_GetCurrentAlternateSetting | GetCurrentAlternateSetting |
Gets the current alternate interface setting for an interface. Gets the active bAlternateSetting for the current/default interface. More... | |
WinUSB_QueryPipe | QueryPipe |
Retrieves information about a pipe that is associated with an interface. The QueryPipe function does not retrieve information about the control pipe. More... | |
WinUSB_SetPipePolicy | SetPipePolicy |
Sets the policy for a specific pipe associated with an endpoint on the device. This is a synchronous operation. More... | |
WinUSB_GetPipePolicy | GetPipePolicy |
Gets the policy for a specific pipe (endpoint). More... | |
WinUSB_ReadPipe | ReadPipe |
Reads data from the specified pipe. More... | |
WinUSB_WritePipe | WritePipe |
Writes data to a pipe. More... | |
WinUSB_ControlTransfer | ControlTransfer |
Transmits control data over a default control endpoint. A ControlTransfer is never cached. These requests always go directly to the usb device. More... | |
WinUSB_ResetPipe | ResetPipe |
Resets the data toggle and clears the stall condition on a pipe. More... | |
WinUSB_AbortPipe | AbortPipe |
Aborts all of the pending transfers for a pipe. More... | |
WinUSB_FlushPipe | FlushPipe |
Discards any data that is cached in a pipe. More... | |
WinUSB_SetPowerPolicy | SetPowerPolicy |
Sets the power policy for a device. The following list summarizes the effects of changes to power management states: More... | |
WinUSB_GetPowerPolicy | GetPowerPolicy |
Gets the power policy for a device. More... | |
WinUSB_GetOverlappedResult | GetOverlappedResult |
Retrieves the results of an overlapped operation on the specified winUSB handle. More... | |
Private Types | |
typedef struct XsWinUsb::_WINUSB_API | WINUSB_API |
typedef struct XsWinUsb::_WINUSB_API | WINUSB_API |
Private Member Functions | |
void | initLibrary () |
void | initLibrary () |
Private Attributes | |
WINUSB_API | m_winUsb |
XsLibraryLoader * | m_libraryLoader |
|
private |
|
private |
XsWinUsb::XsWinUsb | ( | void | ) |
Definition at line 17 of file xswinusb.cpp.
References initLibrary(), and m_libraryLoader.
XsWinUsb::~XsWinUsb | ( | void | ) |
Definition at line 23 of file xswinusb.cpp.
References m_libraryLoader.
XsWinUsb::XsWinUsb | ( | void | ) |
XsWinUsb::~XsWinUsb | ( | void | ) |
|
private |
|
private |
Definition at line 28 of file xswinusb.cpp.
References XsWinUsb::_WINUSB_API::AbortPipe, XsWinUsb::_WINUSB_API::ControlTransfer, XsWinUsb::_WINUSB_API::FlushPipe, XsWinUsb::_WINUSB_API::Free, XsWinUsb::_WINUSB_API::GetAssociatedInterface, XsWinUsb::_WINUSB_API::GetCurrentAlternateSetting, XsWinUsb::_WINUSB_API::GetDescriptor, XsWinUsb::_WINUSB_API::GetOverlappedResult, XsWinUsb::_WINUSB_API::GetPipePolicy, XsWinUsb::_WINUSB_API::GetPowerPolicy, XsWinUsb::_WINUSB_API::Initialize, m_libraryLoader, m_winUsb, XsWinUsb::_WINUSB_API::QueryDeviceInformation, XsWinUsb::_WINUSB_API::QueryInterfaceSettings, XsWinUsb::_WINUSB_API::QueryPipe, XsWinUsb::_WINUSB_API::ReadPipe, XsWinUsb::_WINUSB_API::ResetPipe, XsWinUsb::_WINUSB_API::SetCurrentAlternateSetting, XsWinUsb::_WINUSB_API::SetPipePolicy, XsWinUsb::_WINUSB_API::SetPowerPolicy, and XsWinUsb::_WINUSB_API::WritePipe.
Referenced by XsWinUsb().
BOOL XsWinUsb::AbortPipe |
Aborts all of the pending transfers for a pipe.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | PipeID | An 8-bit value that consists of a 7-bit address and a direction bit. This parameter corresponds to the bEndpointAddress field in the endpoint descriptor. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 59 of file xsens/xswinusb.h.
BOOL XsWinUsb::ControlTransfer |
Transmits control data over a default control endpoint. A ControlTransfer is never cached. These requests always go directly to the usb device.
[in] | InterfaceHandle | A valid winUSB interface handle returned by:
|
[in] | SetupPacket | The 8-byte setup packet of type WINUSB_SETUP_PACKET. |
[in,out] | Buffer | A caller-allocated buffer that contains the data to transfer. |
[in] | BufferLength | The number of bytes to transfer, not including the setup packet. This number must be less than or equal to the size, in bytes, of Buffer. |
[out] | LengthTransferred | A pointer to a UINT variable that receives the actual number of transferred bytes. If the application does not expect any data to be transferred during the data phase (BufferLength is zero), LengthTransferred can be NULL. |
[in] | Overlapped | An optional pointer to an OVERLAPPED structure, which is used for asynchronous operations. If this parameter is specified, ControlTransfer immediately returns, and the event is signaled when the operation is complete. If Overlapped is not supplied, the ControlTransfer function transfers data synchronously. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. If an Overlapped member is supplied and the operation succeeds this function returns FALSE and sets last error to ERROR_IO_PENDING. |
Definition at line 57 of file xsens/xswinusb.h.
BOOL XsWinUsb::FlushPipe |
Discards any data that is cached in a pipe.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | PipeID | An 8-bit value that consists of a 7-bit address and a direction bit. This parameter corresponds to the bEndpointAddress field in the endpoint descriptor. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 60 of file xsens/xswinusb.h.
BOOL XsWinUsb::Free |
Frees a WinUsb interface handle.
[in] | InterfaceHandle | Handle to an interface on the device. This handle must be created by a previous call to see Initialize or GetAssociatedInterface. \returns TRUE \sa GetAssociatedInterface. |
Definition at line 45 of file xsens/xswinusb.h.
BOOL XsWinUsb::GetAssociatedInterface |
Retrieves a handle for an associated interface.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | AssociatedInterfaceIndex | An index that specifies the associated interface to retrieve. A value of 0 indicates the first associated interface, a value of 1 indicates the second associated interface, and so on. |
[out] | AssociatedInterfaceHandle | A handle for the associated interface. Callers must pass this interface handle to WinUsb Functions exposed by WinUsb.dll. To close this handle, call Free. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 46 of file xsens/xswinusb.h.
BOOL XsWinUsb::GetCurrentAlternateSetting |
Gets the current alternate interface setting for an interface. Gets the active bAlternateSetting for the current/default interface.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[out] | AltSettingNumber | A pointer to an unsigned character that receives an integer that indicates the current alternate setting. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 51 of file xsens/xswinusb.h.
BOOL XsWinUsb::GetDescriptor |
Gets the requested descriptor. This is a synchronous operation.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | DescriptorType | A value that specifies the type of descriptor to return. This parameter corresponds to the bDescriptorType field of a standard device descriptor, whose values are described in the Universal Serial Bus specification. |
[in] | Index | The descriptor index. For an explanation of the descriptor index, see the Universal Serial Bus specification (www.usb.org). |
[in] | LanguageID | A value that specifies the language identifier, if the requested descriptor is a string descriptor. |
[out] | Buffer | A caller-allocated buffer that receives the requested descriptor. |
[in] | BufferLength | The length, in bytes, of Buffer. |
[out] | LengthTransferred | The number of bytes that were copied into Buffer. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 47 of file xsens/xswinusb.h.
BOOL XsWinUsb::GetOverlappedResult |
Retrieves the results of an overlapped operation on the specified winUSB handle.
This function is like the Win32 API routine, GetOverlappedResult, with one difference; instead of passing a file handle that is returned from CreateFile, the caller passes an interface handle that is returned from Initialize, or GetAssociatedInterface. The caller can use either API routine, if the appropriate handle is passed. The GetOverlappedResult function extracts the file handle from the interface handle and then calls GetOverlappedResult. The results that are reported by the GetOverlappedResult function are those from the specified handle's last overlapped operation to which the specified standard windows OVERLAPPED structure was provided, and for which the operation's results were pending. A pending operation is indicated when the function that started the operation returns FALSE, and the GetLastError routine returns ERROR_IO_PENDING. When an I/O operation is pending, the function that started the operation resets the hEvent member of the standard windows OVERLAPPED structure to the nonsignaled state. Then when the pending operation has been completed, the system sets the event object to the signaled state. The caller can specify that an event object is manually reset in the standard windows OVERLAPPED structure. If an automatic reset event object is used, the event handle must not be specified in any other wait operation in the interval between starting the overlapped operation and the call to GetOverlappedResult. For example, the event object is sometimes specified in one of the wait routines to wait for the operation to be completed. When the wait routine returns, the system sets an auto-reset event's state to nonsignaled, and a successive call to GetOverlappedResult with the bWait parameter set to TRUE causes the function to be blocked indefinitely. If the bWait parameter is TRUE, GetOverlappedResult determines whether the pending operation has been completed by waiting for the event object to be in the signaled state.
If the hEvent member of the standard windows OVERLAPPED structure is NULL, the system uses the state of the file handle to signal when the operation has been completed. Do not use file handles for this purpose. It is better to use an event object because of the confusion that can occur when multiple concurrent overlapped operations are performed on the same file. In this situation, you cannot know which operation caused the state of the object to be signaled.
[in] | InterfaceHandle | An initialized usb handle, see Initialize |
[in] | Overlapped | A pointer to a standard windows OVERLAPPED structure that was specified when the overlapped operation was started. |
[out] | lpNumberOfBytesTransferred | A pointer to a variable that receives the number of bytes that were actually transferred by a read or write operation. |
[in] | bWait | If this parameter is TRUE, the function does not return until the operation has been completed. If this parameter is FALSE and the operation is still pending, the function returns FALSE and the GetLastError function returns ERROR_IO_INCOMPLETE. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 63 of file xsens/xswinusb.h.
BOOL XsWinUsb::GetPipePolicy |
Gets the policy for a specific pipe (endpoint).
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | PipeID | An 8-bit value that consists of a 7-bit address and a direction bit. This parameter corresponds to the bEndpointAddress field in the endpoint descriptor. |
[in] | PolicyType | A UINT variable that specifies the policy parameter to retrieve. The current value for the policy parameter is retrieved the Value parameter. |
[in,out] | ValueLength | A pointer to the size, in bytes, of the buffer that Value points to. On output, ValueLength receives the size, in bytes, of the data that was copied into the Value buffer. |
[out] | Value | A pointer to a buffer that receives the specified pipe policy value. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 54 of file xsens/xswinusb.h.
BOOL XsWinUsb::GetPowerPolicy |
Gets the power policy for a device.
[in] | InterfaceHandle | An initialized usb handle, see Initialize |
[in] | PolicyType | A value that specifies the power policy parameter to retrieve in Value. The following table describes symbolic constants that are valid.
|
[in,out] | ValueLength | A pointer to the size of the buffer that Value. On output, ValueLength receives the size of the data that was copied into the Value buffer. |
[out] | Value | A buffer that receives the specified power policy parameter. For more information, see PolicyType. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 62 of file xsens/xswinusb.h.
BOOL XsWinUsb::Initialize |
Creates/opens a WinUsb interface handle from the device list.
[out] | InterfaceHandle | Receives a handle configured to the first (default) interface on the device. This handle is required by other WinUsb routines that perform operations on the default interface. The handle is opaque. To release this handle, call the Free function. |
[in] | DevInfo | The device list element to open. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 44 of file xsens/xswinusb.h.
|
private |
Definition at line 92 of file xsens/xswinusb.h.
Referenced by initLibrary(), XsWinUsb(), and ~XsWinUsb().
|
private |
Definition at line 91 of file xsens/xswinusb.h.
Referenced by initLibrary().
BOOL XsWinUsb::QueryDeviceInformation |
Retrieves information about the physical device that is associated with a WinUSB handle.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | InformationType | A value that specifies which interface information value to retrieve. On input, InformationType must have the following value: DEVICE_SPEED (0x01). |
[in,out] | BufferLength | The maximum number of bytes to read. This number must be less than or equal to the size, in bytes, of Buffer. On output, BufferLength is set to the actual number of bytes that were copied into Buffer. |
[in,out] | Buffer | A caller-allocated buffer that receives the requested value. On output, Buffer indicates the device speed: (0x01) low/full speed device. (0x03) high speed device. |
Definition at line 49 of file xsens/xswinusb.h.
BOOL XsWinUsb::QueryInterfaceSettings |
Retrieves the interface descriptor for the specified alternate interface settings for a particular interface handle.
The QueryInterfaceSettings call searches the current/default interface array for the alternate interface specified by the caller in the AltSettingIndex. If the specified alternate interface is found, the function populates the caller-allocated USB_INTERFACE_DESCRIPTOR structure. If the specified alternate interface is not found, then the call fails with the ERROR_NO_MORE_ITEMS code.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | AltSettingIndex | A value that indicates which alternate setting index to return. A value of 0 indicates the first alternate setting, a value of 1 indicates the second alternate setting, and so on. |
[out] | UsbAltInterfaceDescriptor | A pointer to a caller-allocated USB_INTERFACE_DESCRIPTOR structure that contains information about the interface that AltSettingNumber specified. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 48 of file xsens/xswinusb.h.
BOOL XsWinUsb::QueryPipe |
Retrieves information about a pipe that is associated with an interface. The QueryPipe function does not retrieve information about the control pipe.
Each interface on the USB device can have multiple endpoints. To communicate with each of these endpoints, the bus driver creates pipes for each endpoint on the interface. The pipe indices are zero-based. Therefore for n number of endpoints, the pipes' indices are set from n-1. QueryPipe parses the configuration descriptor to get the interface specified by the caller. It searches the interface descriptor for the endpoint descriptor associated with the caller-specified pipe. If the endpoint is found, the function populates the caller-allocated WINUSB_PIPE_INFORMATION structure with information from the endpoint descriptor.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | AltSettingNumber | A value that specifies the alternate interface to return the information for. |
[in] | PipeIndex | A value that specifies the pipe to return information about. This value is not the same as the bEndpointAddress field in the endpoint descriptor. A PipeIndex value of 0 signifies the first endpoint that is associated with the interface, a value of 1 signifies the second endpoint, and so on. PipeIndex must be less than the value in the bNumEndpoints field of the interface descriptor. |
[out] | PipeInformation | A pointer, on output, to a caller-allocated WINUSB_PIPE_INFORMATION structure that contains pipe information. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 52 of file xsens/xswinusb.h.
BOOL XsWinUsb::ReadPipe |
Reads data from the specified pipe.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | PipeID | An 8-bit value that consists of a 7-bit address and a direction bit. This parameter corresponds to the bEndpointAddress field in the endpoint descriptor. |
[out] | Buffer | A caller-allocated buffer that receives the data that is read. |
[in] | BufferLength | The maximum number of bytes to read. This number must be less than or equal to the size, in bytes, of Buffer. |
[out] | LengthTransferred | A pointer to a UINT variable that receives the actual number of bytes that were copied into Buffer. For more information, see Remarks. |
[in] | Overlapped | An optional pointer to an overlapped structure for asynchronous operations. This can be a KOVL_HANDLE or a pointer to a standard windows OVERLAPPED structure. If this parameter is specified, ReadPipe returns immediately rather than waiting synchronously for the operation to complete before returning. An event is signaled when the operation is complete. |
Definition at line 55 of file xsens/xswinusb.h.
BOOL XsWinUsb::ResetPipe |
Resets the data toggle and clears the stall condition on a pipe.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | PipeID | An 8-bit value that consists of a 7-bit address and a direction bit. This parameter corresponds to the bEndpointAddress field in the endpoint descriptor. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 58 of file xsens/xswinusb.h.
BOOL XsWinUsb::SetCurrentAlternateSetting |
Sets the alternate setting of an interface. Sets the active bAlternateSetting for the current/default interface.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | AltSettingNumber | The value that is contained in the bAlternateSetting member of the USB_INTERFACE_DESCRIPTOR structure. This structure can be populated by the QueryInterfaceSettings routine. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. \sa QueryInterfaceSettings |
Definition at line 50 of file xsens/xswinusb.h.
BOOL XsWinUsb::SetPipePolicy |
Sets the policy for a specific pipe associated with an endpoint on the device. This is a synchronous operation.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | PipeID | An 8-bit value that consists of a 7-bit address and a direction bit. This parameter corresponds to the bEndpointAddress field in the endpoint descriptor. |
[in] | PolicyType | A UINT variable that specifies the policy parameter to change. The Value parameter contains the new value for the policy parameter. See the remarks section for information about each of the pipe policies and the resulting behavior. |
[in] | ValueLength | The size, in bytes, of the buffer at Value. |
[in] | Value | The new value for the policy parameter that PolicyType specifies. The size of this input parameter depends on the policy to change. For information about the size of this parameter, see the description of the PolicyType parameter. \remarks The following list describes symbolic constants for \a PolicyType - SHORT_PACKET_TERMINATE (0x01) - The default value is FALSE. - To enable SHORT_PACKET_TERMINATE, in Value pass the address of a caller-allocated UCHAR variable set to TRUE (nonzero). - Enabling SHORT_PACKET_TERMINATE causes the driver to send a zero-length packet at the end of every write request to the host controller. - AUTO_CLEAR_STALL (0x02) - The default value is FALSE. To enable AUTO_CLEAR_STALL, in Value pass the address of a caller-allocated UCHAR variable set to TRUE (nonzero). - Enabling AUTO_CLEAR_STALL causes winUSB to reset the pipe in order to automatically clear the stall condition. Data continues to flow on the bulk and interrupt IN endpoints again as soon as a new or a queued transfer arrives on the endpoint. This policy parameter does not affect control pipes. - Disabling AUTO_CLEAR_STALL causes all transfers (that arrive to the endpoint after the stalled transfer) to fail until the caller manually resets the endpoint's pipe by calling ResetPipe. - PIPE_TRANSFER_TIMEOUT (0x03) - The default value is zero. To set a time-out value, in Value pass the address of a caller-allocated UINT variable that contains the time-out interval. - The PIPE_TRANSFER_TIMEOUT value specifies the time-out interval, in milliseconds. The host controller cancels transfers that do not complete within the specified time-out interval. - A value of zero (default) indicates that transfers do not time out because the host controller never cancels the transfer. - IGNORE_SHORT_PACKETS (0x04) - The default value is FALSE. To enable IGNORE_SHORT_PACKETS, in Value pass the address of a caller-allocated UCHAR variable set to TRUE (nonzero). - Enabling IGNORE_SHORT_PACKETS causes the host controller to not complete a read operation after it receives a short packet. Instead, the host controller completes the operation only after the host has read the specified number of bytes. - Disabling IGNORE_SHORT_PACKETS causes the host controller to complete a read operation when either the host has read the specified number of bytes or the host has received a short packet. - ALLOW_PARTIAL_READS (0x05) - The default value is TRUE (nonzero). To disable ALLOW_PARTIAL_READS, in Value pass the address of a caller-allocated UCHAR variable set to FALSE (zero). - Disabling ALLOW_PARTIAL_READS causes the read requests to fail whenever the device returns more data (on bulk and interrupt IN endpoints) than the caller requested. - Enabling ALLOW_PARTIAL_READS causes winUSB to save or discard the extra data when the device returns more data (on bulk and interrupt IN endpoints) than the caller requested. This behavior is defined by setting the AUTO_FLUSH value. - AUTO_FLUSH (0x06) - The default value is FALSE (zero). To enable AUTO_FLUSH, in Value pass the address of a caller-allocated UCHAR variable set to TRUE (nonzero). - AUTO_FLUSH must be used with ALLOW_PARTIAL_READS enabled. If ALLOW_PARTIAL_READS is TRUE, the value of AUTO_FLUSH determines the action taken by winUSB when the device returns more data than the caller requested. - Disabling ALLOW_PARTIAL_READS causes winUSB to ignore the AUTO_FLUSH value. - Disabling AUTO_FLUSH with ALLOW_PARTIAL_READS enabled causes winUSB to save the extra data, add the data to the beginning of the caller's next read request, and send it to the caller in the next read operation. - Enabling AUTO_FLUSH with ALLOW_PARTIAL_READS enabled causes winUSB to discard the extra data remaining from the read request. - RAW_IO (0x07) - The default value is FALSE (zero). To enable RAW_IO, in Value pass the address of a caller-allocated UCHAR variable set to TRUE (nonzero). - Enabling RAW_IO causes winUSB to send data directly to the USB driver stack, bypassing winUSB's queuing and error handling mechanism. - The buffers that are passed to \a ReadPipe must be configured by the caller as follows: - The buffer length must be a multiple of the maximum endpoint packet size. - The length must be less than or equal to the value of MAXIMUM_TRANSFER_SIZE retrieved by GetPipePolicy. - Disabling RAW_IO (FALSE) does not impose any restriction on the buffers that are passed to \a ReadPipe. - RESET_PIPE_ON_RESUME (0x09) - The default value is FALSE (zero). To enable RESET_PIPE_ON_RESUME, in Value pass the address of a caller-allocated UCHAR variable set to TRUE (nonzero). - TRUE (or a nonzero value) indicates that on resume from suspend, winUSB resets the endpoint before it allows the caller to send new requests to the endpoint. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 53 of file xsens/xswinusb.h.
BOOL XsWinUsb::SetPowerPolicy |
Sets the power policy for a device. The following list summarizes the effects of changes to power management states:
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | PolicyType | A value that specifies the power policy to set. The following table describes symbolic constants.
|
[in] | ValueLength | The size, in bytes, of the buffer at Value. |
[in] | Value | The new value for the power policy parameter. Data type and value for Value depends on the type of power policy passed in PolicyType. For more information, see PolicyType. \returns On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information. |
Definition at line 61 of file xsens/xswinusb.h.
BOOL XsWinUsb::WritePipe |
Writes data to a pipe.
[in] | InterfaceHandle | An initialized usb handle, see Initialize. |
[in] | PipeID | An 8-bit value that consists of a 7-bit address and a direction bit. This parameter corresponds to the bEndpointAddress field in the endpoint descriptor. |
[in] | Buffer | A caller-allocated buffer the data is written from. |
[in] | BufferLength | The maximum number of bytes to write. This number must be less than or equal to the size, in bytes, of Buffer. |
[out] | LengthTransferred | A pointer to a UINT variable that receives the actual number of bytes that were transferred from Buffer. |
[in] | Overlapped | An optional pointer to an overlapped structure for asynchronous operations. This can be a KOVL_HANDLE or a pointer to a standard windows OVERLAPPED structure. If this parameter is specified, WritePipe returns immediately rather than waiting synchronously for the operation to complete before returning. An event is signaled when the operation is complete. |
Definition at line 56 of file xsens/xswinusb.h.
Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020 |