These flags are available beginning with version 5.0.4 of WinDriver.

When the USB_SHORT_TRANSFER flag is set, then WD_UsbTransfer() will return on one of two occasions:

  1. A short packet (i.e., less than the maximum packet size) was transferred or the device transferred a zero (0) packet, to indicate a short transfer. In this case fOk will be TRUE.
  2. The time-out period (specified in usbTrans.dwTimeout) expired before a short packet was transferred (or a zero packet was received). In this case fOk will be FALSE.

When the USB_FULL_TRANSFER flag is set, then WD_UsbTransfer() will return on one of the following two occasions:

  1. The entire buffer (usbTrans.dwBytes) was filled/written. In this casefOk will be TRUE.
  2. The time-out period expired before the buffer was entirely filled/written. In this case fOk will be FALSE (although some data may very well have been transferred).

By default, the USB_SHORT_TRANSFER flag is set for bulk and interrupttransfers and the USB_FULL_TRANSFER flag is set for isochronous transfers.Control transfers are always short transfers.

In former versions of WinDriver (until, and including, v5.0.3),WD_UsbTransfer() behaved (for all types of transfers) as described above for the USB_SHORT_TRANSFER flag in v5.0.4 and above — i.e., the function always returned on one of two occasions:

  1. A short packet (i.e., less than the maximum packet size) was transferred or the device transferred a zero (0) packet, to indicate a short transfer — in which case fOK would have been TRUE (even if the buffer was not entirely filled/written).
  2. The time-out expired without any such transfer — in which casefOK would be FALSE.