funzione USBD_AssignUrbToIoStackLocation (usbdlib.h)

La routine USBD_AssignUrbToIoStackLocation viene chiamata da un driver client per associare UN'istanza di DIMENSION alla posizione successiva dello stack di IRP.

Sintassi

void USBD_AssignUrbToIoStackLocation(
  [in] USBD_HANDLE        USBDHandle,
  [in] PIO_STACK_LOCATION IoStackLocation,
  [in] PURB               Urb
);

Parametri

[in] USBDHandle

Handle USBD recuperato in una chiamata precedente alla routine di USBD_CreateHandle .

[in] IoStackLocation

Puntatore alla posizione successiva dello stack di IRP (IO_STACK_LOCATION). Il driver client ha ricevuto un puntatore alla posizione dello stack in una chiamata precedente a IoGetNextIrpStackLocation.

[in] Urb

Puntatore alla struttura DI MAPPING allocata da USBD_UrbAllocate, USBD_IsochUrbAllocate, USBD_SelectConfigUrbAllocateAndBuild o USBD_SelectInterfaceUrbAllocateAndBuild.

Valore restituito

nessuno

Osservazioni

Se il driver client ha allocato un USBD_URBALLOCATE chiamando USBD_UrbAllocate, USBD_IsochUrbAllocate, USBD_SelectConfigUrbAllocateAndBuildo USBD_SelectInterfaceUrbAllocateAndBuild, il driver devechiamareUSBD_AssignUrbToIoStackLocation per associare l'ISTANZA a IO_STACK_LOCATION associato all'IRP. Per gli URL allocati da tali routine, USBD_AssignUrbToIoStackLocation sostituisce l'impostazione Parameters.Others.Argument1 di IO_STACK_LOCATION all'ORDINAMENTO. (vedere IOCTL_INTERNAL_USB_SUBMIT_URB).

Il driver client non deve chiamare USBD_AssignUrbToIoStackLocation per un'istanza di URB allocata usando altri meccanismi, ad esempio l'allocazione dell'ISTANZA nello stack. In caso contrario, lo stack di driver USB genera un controllo di bug.

Il driver client deve chiamare USBD_AssignUrbToIoStackLocation prima di chiamare IoCallDriver per inviare la richiesta. USBD_AssignUrbToIoStackLocation popola la posizione successiva dello stack di IRP con l'ENTITÀ di controllo. La routine aggiorna anche il membro FileObject di IO_STACK_LOCATION.

Per un esempio di codice, vedere Come inviare UN'ISTANZA DI.

Requisiti

Requisito Valore
Client minimo supportato Richiede WDK per Windows 8. Destinazione Windows Vista e versioni successive del sistema operativo Windows.
Piattaforma di destinazione Desktop
Intestazione usbdlib.h
Libreria Usbdex.lib
IRQL <=DISPATCH_LEVEL

Vedi anche

Come inviare UN'istanza DI

USBD_IsochUrbAllocate

USBD_SelectConfigUrbAllocateAndBuild

USBD_SelectInterfaceUrbAllocateAndBuild

USBD_UrbAllocate