Condividi tramite


funzione WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP (wdfrequest.h)

[Si applica a KMDF e UMDF]

La funzione WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP imposta un nuovo IRP nella struttura WDF_REQUEST_REUSE_PARAMS di un driver.

Sintassi

void WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP(
  [in, out] PWDF_REQUEST_REUSE_PARAMS Params,
  [in]      PIRP                      NewIrp
);

Parametri

[in, out] Params

Puntatore a una struttura di WDF_REQUEST_REUSE_PARAMS fornita dal chiamante.

[in] NewIrp

Puntatore a una struttura IRP fornita dal chiamante.

Valore restituito

nessuno

Osservazioni

Se la chiamata di un driver a WdfRequestReuse specifica una nuova struttura IRP, il driver deve prima chiamare WDF_REQUEST_REUSE_PARAMS_INIT e quindi chiamare WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP per inizializzare una struttura WDF_REQUEST_REUSE_PARAMS.

La funzione WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP imposta il membro NewIrp della struttura sul puntatore IRP specificato. Imposta anche il flag WDF_REQUEST_REUSE_SET_NEW_IRP nel membro Flag della struttura.

Esempio

L'esempio di codice seguente inizializza una struttura WDF_REQUEST_REUSE_PARAMS , fornisce una nuova struttura IRP per la richiesta di I/O e quindi chiama WdfRequestReuse.

WDF_REQUEST_REUSE_PARAMS  params;
NTSTATUS  status;
PIRP  myIrp;
...
WDF_REQUEST_REUSE_PARAMS_INIT(
                              &params,
                              WDF_REQUEST_REUSE_NO_FLAGS,
                              STATUS_SUCCESS
                              );
WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP(
                                     &params,
                                     myIrp
                                     );
status = WdfRequestReuse(
                         Request,
                         &params
                         );
...

Requisiti

Requisito Valore
Piattaforma di destinazione Universale
Versione KMDF minima 1.0
Versione UMDF minima 2,0
Intestazione wdfrequest.h (include Wdf.h)

Vedi anche

WDF_REQUEST_REUSE_PARAMS

WDF_REQUEST_REUSE_PARAMS_INIT

WdfRequestReuse