UfxDeviceIoInternalControl 함수(ufxclient.h)

커널 모드 IOCTL을 UFX에 전달합니다.

구문

BOOLEAN UfxDeviceIoInternalControl(
  [in] UFXDEVICE  UfxDevice,
  [in] WDFREQUEST Request,
  [in] size_t     OutputBufferLength,
  [in] size_t     InputBufferLength,
  [in] ULONG      IoControlCode
);

매개 변수

[in] UfxDevice

UfxDeviceCreate를 호출하여 드라이버가 만든 UFX 디바이스 개체에 대한 핸들입니다.

[in] Request

프레임워크 요청 개체에 대한 핸들입니다.

[in] OutputBufferLength

출력 버퍼를 사용할 수 있는 경우 요청 출력 버퍼의 길이(바이트)입니다.

[in] InputBufferLength

입력 버퍼를 사용할 수 있는 경우 요청의 입력 버퍼 길이(바이트)입니다.

[in] IoControlCode

요청과 연결된 드라이버 정의 또는 시스템 정의 IOCTL입니다.

반환 값

호출이 성공했는지 여부를 나타내는 부울 값입니다.

설명

클라이언트 드라이버는 UfxDeviceIoInternalControl 을 호출하여 EvtIoInternalDeviceControl 콜백 함수에서 수신하는 내부 IOCTL을 UFX로 전달합니다. 다음 예제는 다음 방법을 보여 줍니다.

VOID
DefaultQueue_EvtIoInternalDeviceControl(
    _In_ WDFQUEUE Queue,
    _In_ WDFREQUEST Request,
    _In_ size_t OutputBufferLength,
    _In_ size_t InputBufferLength,
    _In_ ULONG IoControlCode
    )
/*++

Routine Description:

    EvtIoInternalDeviceControl handler for the default Queue

Arguments:

    Queue -  Handle to the framework queue object that is associated with the
             I/O request.

    Request - Handle to a framework request object.

    OutputBufferLength - Size of the output buffer in bytes

    InputBufferLength - Size of the input buffer in bytes

    IoControlCode - I/O control code.

--*/
{
    WDFDEVICE WdfDevice;
    PCONTROLLER_CONTEXT ControllerContext;
    BOOLEAN HandledbyUfx;   

    TraceEntry();

    TraceVerbose("InternalQueue 0x%p, Request 0x%p, OutputBufferLength %d, "
                  "InputBufferLength %d, IoControlCode %d",
                  Queue, Request, (int) OutputBufferLength, 
                  (int) InputBufferLength, IoControlCode);
    
    WdfDevice = WdfIoQueueGetDevice(Queue);
    ControllerContext = DeviceGetControllerContext(WdfDevice);

    HandledbyUfx = UfxDeviceIoInternalControl(
                        ControllerContext->UfxDevice,
                        Request,
                        OutputBufferLength,
                        InputBufferLength,
                        IoControlCode);

    if (!HandledbyUfx) {
        TraceError("Received an unsupported IOCTL");
        WdfRequestComplete(Request, STATUS_INVALID_DEVICE_REQUEST);
    }

    TraceExit();
}

요구 사항

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