UfxDeviceNotifyHardwareReady 函式 (ufxclient.h)
通知UFX硬體已就緒。
語法
void UfxDeviceNotifyHardwareReady(
[in] UFXDEVICE UfxDevice
);
參數
[in] UfxDevice
呼叫 UfxDeviceCreate所建立驅動程式的UFX裝置物件的句柄。
傳回值
無
備註
用戶端驅動程式通常會從其 EvtDeviceD0Entry 回呼函式呼叫 UfxDeviceNotifyHardwareReady,如下列範例所示。
NTSTATUS
OnEvtDeviceD0Entry (
_In_ WDFDEVICE Device,
_In_ WDF_POWER_DEVICE_STATE PreviousState
)
/*++
Routine Description:
Called by the framework after entering D0 state.
Arguments:
Device - WDFDEVICE framework handle to the bus FDO.
PreviousState - The WDF_POWER_DEVICE_STATE from which the stack is
making this transition.
Return Value:
Returns STATUS_SUCCESS or an appropriate NTSTATUS code otherwise.
--*/
{
PCONTROLLER_CONTEXT ControllerContext;
TraceEntry();
ControllerContext = DeviceGetControllerContext(Device);
if (PreviousState > WdfPowerDeviceD1) {
DevicePerformSoftReset(Device);
WdfWaitLockAcquire(ControllerContext->InitializeDefaultEndpointLock, NULL);
ControllerContext->InitializeDefaultEndpoint = TRUE;
WdfWaitLockRelease(ControllerContext->InitializeDefaultEndpointLock);
}
if (PreviousState == WdfPowerDeviceD3Final) {
//
// Notify UFX that HW is now ready
//
UfxDeviceNotifyHardwareReady(ControllerContext->UfxDevice);
}
TraceExit();
return STATUS_SUCCESS;
}
規格需求
需求 | 值 |
---|---|
最低支援的用戶端 | Windows 10 |
目標平台 | Windows |
標頭 | ufxclient.h |
程式庫 | ufxstub.lib |
IRQL | DISPATCH_LEVEL |