Funzione WdfDeviceGetDevicePnpState (wdfdevice.h)

[Si applica solo a KMDF]

Nota

Questa funzione è destinata solo all'uso interno di Microsoft.

Il metodo WdfDeviceGetDevicePnpState restituisce lo stato corrente della macchina a stati Plug and Play del framework per un dispositivo specificato.

Sintassi

WDF_DEVICE_PNP_STATE WdfDeviceGetDevicePnpState(
  [in] WDFDEVICE Device
);

Parametri

[in] Device

Handle per un oggetto dispositivo framework.

Valore restituito

WdfDeviceGetDevicePnpState restituisce un enumeratore tipizzato WDF_DEVICE_PNP_STATE che identifica lo stato corrente della macchina a stati Plug and Play del framework per il dispositivo specificato.

Se il driver fornisce un handle di oggetto non valido, si verifica un controllo di bug.

Commenti

Per altre informazioni sulle macchine a stati del framework, vedere State Machines in the Framework.For more information about the framework's state machines, see State Machines in the Framework.

Esempio

Nell'esempio di codice seguente viene ottenuto lo stato corrente del Plug and Play macchina a stati del framework per un dispositivo specificato.

WDF_DEVICE_PNP_STATE state;

state = WdfDeviceGetDevicePnpState(Device);

Requisiti

Requisito Valore
Piattaforma di destinazione Universale
Versione KMDF minima 1.0
Intestazione wdfdevice.h (include Wdf.h)
Libreria Wdf01000.sys (vedere Controllo delle versioni della libreria framework).
IRQL <= DISPATCH_LEVEL
Regole di conformità DDI DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf)

Vedi anche

WdfDevStateNormalize

WdfDeviceGetDevicePowerPolicyState

WdfDeviceGetDevicePowerState