WinUsb_GetCurrentFrameNumber function (winusb.h)

The WinUsb_GetCurrentFrameNumber function gets the current frame number for the bus.

Syntax

BOOL WinUsb_GetCurrentFrameNumber(
  [in]  WINUSB_INTERFACE_HANDLE InterfaceHandle,
  [out] PULONG                  CurrentFrameNumber,
  [out] LARGE_INTEGER           *TimeStamp
);

Parameters

[in] InterfaceHandle

The handle to the device that CreateFile returned.

[out] CurrentFrameNumber

The current frame number value.

[out] TimeStamp

The time stamp value when the current frame was read.

Return value

WinUsb_GetCurrentFrameNumber returns TRUE if the operation succeeds. Otherwise this function returns FALSE, and the caller can retrieve the logged error by calling GetLastError.

Remarks

The caller may compare the PerformanceCount with the value returned by the Win32 function QueryPerformanceCounter to determine if there has been a delay in transitioning back to user-mode after the frame number was read. The caller can then adjust the starting frame number as needed.

Requirements

Requirement Value
Minimum supported client Windows 8.1
Minimum supported server Windows Server 2012 R2
Target Platform Universal
Header winusb.h (include Winusb.h)
Library Winusb.lib
DLL Winusb.dll

See also

Send USB isochronous transfers from a WinUSB desktop app

WinUSB Functions