USBD_IsochUrbAllocate function (usbdlib.h)

The USBD_IsochUrbAllocate routine allocates and formats a URB structure for an isochronous transfer request.

Note

For Windows Driver Framework (WDF) Drivers: If your client driver is WDF-based, you must call the WdfUsbTargetDeviceCreateIsochUrb method instead of USBD_IsochUrbAllocate to allocate memory for the URB structure.

Syntax

NTSTATUS USBD_IsochUrbAllocate(
  [in]  USBD_HANDLE USBDHandle,
  [in]  ULONG       NumberOfIsochPackets,
  [out] PURB        *Urb
);

Parameters

[in] USBDHandle

USBD handle that is retrieved by the client driver in a previous call to the USBD_CreateHandle routine.

[in] NumberOfIsochPackets

Specifies the maximum number of isochronous packets required to perform the transfer. The transfer buffer is described in a variable-length array of USBD_ISO_PACKET_DESCRIPTOR structures that stores information about each packet, such as byte offset of the packet within the buffer. The array is specified in the IsoPacket member of the _URB_ISOCH_TRANSFER structure, which is used to define the format of an isochronous request URB.

[out] Urb

Pointer to an URB structure, which receives the URB allocated by USBD_IsochUrbAllocate. All members of the URB structure are set to zero. The allocated URB is large enough to hold the maximum number of isochronous packets indicated by NumberOfIsochPacket.

The client driver must free the URB when the driver has finished using it by calling USBD_UrbFree.

Return value

The USBD_IsochUrbAllocate routine returns STATUS_SUCCESS if the request is successful. Otherwise, USBD_UrbAllocate sets Urb to NULL and returns an NT status failure code.

Possible values include, but are not limited to, STATUS_INVALID_PARAMETER, which indicates the caller passed in NULL to USBDHandle or Urb.

Requirements

Requirement Value
Minimum supported client Requires WDK for Windows 8. Targets Windows Vista and later versions of the Windows operating system.
Target Platform Desktop
Header usbdlib.h
Library Usbdex.lib
IRQL <=DISPATCH_LEVEL

See also