Expand Minimize

USBD_IsochUrbAllocate routine

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 a WDF-based driver, then 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   NumberOfIsochPacket,
  _Out_  PURB *Urb
);

Parameters

USBDHandle [in]

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

NumberOfIsochPacket [in]

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.

Urb [out]

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

Version

Requires WDK for Windows 8. Targets Windows Vista and later versions of the Windows operating system.

Header

Usbdlib.h

Library

Usbdex.lib

IRQL

<=DISPATCH_LEVEL

See also

USBD_ISO_PACKET_DESCRIPTOR
_URB_ISOCH_TRANSFER
How to Transfer Data to USB Isochronous Endpoints
Allocating and Building URBs

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft