UfxFdoInit 함수(ufxclient.h)

클라이언트 드라이버가 WdfDeviceCreate를 호출할 때 이후에 제공하는 WDFDEVICE_INIT 구조를 초기화합니다.

구문

NTSTATUS UfxFdoInit(
  [in]      WDFDRIVER              WdfDriver,
  [in, out] PWDFDEVICE_INIT        DeviceInit,
  [in, out] PWDF_OBJECT_ATTRIBUTES FdoAttributes
);

매개 변수

[in] WdfDriver

드라이버가 WdfDriverCreate 또는 WdfGetDriver 에 대한 이전 호출에서 가져온 드라이버 의 WDF 드라이버 개체에 대한 핸들입니다.

[in, out] DeviceInit

WDFDEVICE_INIT 구조체에 대한 포인터입니다.

[in, out] FdoAttributes

에 대한 개체 특성을 설명하는 호출자가 할당한 WDF_OBJECT_ATTRIBUTES 구조체에 대한 포인터입니다.

반환 값

작업이 성공하면 메서드는 STATUS_SUCCESS 반환하거나 NT_SUCCESS(상태)이 TRUE인 다른 상태 값을 반환합니다. 그렇지 않으면 NT_SUCCESS(상태)이 FALSE와 같은 상태 값을 반환합니다.

설명

클라이언트 드라이버는 EvtDriverDeviceAdd 콜백 함수에서 프레임워크 할당 WDFDEVICE_INIT 구조체에 대한 포인터를 받습니다. 그런 다음 WdfDeviceCreate를 호출하여 WDFDEVICE 개체를 만들기 전에 이 포인터를 사용하여 UfxFdoInit를 호출합니다.

기본적으로 WDF 드라이버의 경우 디바이스의 함수 드라이버는 전원 정책 소유자입니다.

다음 코드 조각은 UfxFdoInit를 호출하는 방법을 보여 있습니다.

NTSTATUS
UfxClientDeviceCreate(
    _In_ WDFDRIVER Driver,
    _In_ PWDFDEVICE_INIT DeviceInit
    )
/*++

Routine Description:

    Worker routine called to create a device and its software resources.

Arguments:

    Driver - WDF driver object

    DeviceInit - Pointer to an opaque init structure. Memory for this
                 structure will be freed by the framework when WdfDeviceCreate
                 succeeds. So don't access the structure after that point.

Return Value:

    Appropriate NTSTATUS value

--*/
{
    WDF_OBJECT_ATTRIBUTES DeviceAttributes;
    WDFDEVICE WdfDevice;

    PAGED_CODE();

    WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&DeviceAttributes, CONTROLLER_CONTEXT);

    //
    // Do UFX-specific initialization
    //
    Status = UfxFdoInit(Driver, DeviceInit, &DeviceAttributes);

    //
    // Proceed to WdfDeviceCreate
    //
    
    ...

}

요구 사항

요구 사항
지원되는 최소 클라이언트 Windows 10
대상 플랫폼 Windows
헤더 ufxclient.h
라이브러리 ufxstub.lib
IRQL PASSIVE_LEVEL