USBD_UrbFree function (usbdlib.h)

The USBD_UrbFree routine releases the URB that is allocated by USBD_UrbAllocate, USBD_IsochUrbAllocate, USBD_SelectConfigUrbAllocateAndBuild, or USBD_SelectInterfaceUrbAllocateAndBuild.

Syntax

void USBD_UrbFree(
  [in] USBD_HANDLE USBDHandle,
  [in] PURB        Urb
);

Parameters

[in] USBDHandle

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

[in] Urb

Pointer to the URB structure to be released.

Return value

None

Remarks

You must call USBD_UrbFree to release the URB allocated by USBD_UrbAllocate after the request is complete.

Failure to call USBD_UrbFree can cause a memory leak.

For a code example, see USBD_UrbAllocate.

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

Allocating and Building URBs

USBD_UrbAllocate