Função UfxDeviceIoInternalControl (ufxclient.h)

Passa IOCTLs do modo kernel para UFX.

Sintaxe

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

Parâmetros

[in] UfxDevice

Um identificador para um objeto de dispositivo UFX que o driver criou chamando UfxDeviceCreate.

[in] Request

Um identificador para um objeto de solicitação de estrutura.

[in] OutputBufferLength

O comprimento, em bytes, do buffer de saída da solicitação, se um buffer de saída estiver disponível.

[in] InputBufferLength

O comprimento, em bytes, do buffer de entrada da solicitação, se um buffer de entrada estiver disponível.

[in] IoControlCode

O IOCTL definido pelo driver ou definido pelo sistema associado à solicitação.

Retornar valor

Um valor booliano que indica se a chamada foi bem-sucedida.

Comentários

O driver do cliente chama UfxDeviceIoInternalControl para encaminhar IOCTLs internos que ele recebe em sua função de retorno de chamada EvtIoInternalDeviceControl para a UFX. O exemplo a seguir mostra como:

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();
}

Requisitos

Requisito Valor
Cliente mínimo com suporte Windows 10
Plataforma de Destino Windows
Cabeçalho ufxclient.h
Biblioteca ufxstub.lib
IRQL DISPATCH_LEVEL