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 di 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 di 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 di WDF_REQUEST_REUSE_SET_NEW_IRP nel membro Flag della struttura.

Esempi

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
                         );
...

Fabbisogno

Requisito Valore
piattaforma di destinazione Universale
versione minima di KMDF 1.0
versione minima di UMDF 2.0
intestazione wdfrequest.h (include Wdf.h)

Vedere anche

WDF_REQUEST_REUSE_PARAMS

WDF_REQUEST_REUSE_PARAMS_INIT

WdfRequestReuse