次の方法で共有


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
ターゲット プラットフォーム ウィンドウズ
ヘッダー ufxclient.h
ライブラリ ufxstub.lib
IRQL DISPATCH_LEVEL