UfxDeviceIoControl 関数 (ufxclient.h)
非内部 IOCTL をユーザー モードから UFX に渡します。
構文
BOOLEAN UfxDeviceIoControl(
[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。
戻り値
呼び出しが成功したかどうかを示すブール値。
備考
クライアント ドライバー UfxDeviceIoControl を呼び出して、EvtIoDeviceControl コールバック関数で受信した内部以外の IOCTL を UFX に転送します。 次の例は、その方法を示しています。
VOID
DefaultQueue_EvtIoDeviceControl(
_In_ WDFQUEUE Queue,
_In_ WDFREQUEST Request,
_In_ size_t OutputBufferLength,
_In_ size_t InputBufferLength,
_In_ ULONG IoControlCode
)
/*++
Routine Description:
EvtIoDeviceControl 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("Queue 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 = UfxDeviceIoControl(
ControllerContext->UfxDevice,
Request,
OutputBufferLength,
InputBufferLength,
IoControlCode);
if (!HandledbyUfx) {
TraceError("Received an unsupported IOCTL");
WdfRequestComplete(Request, STATUS_INVALID_DEVICE_REQUEST);
}
TraceExit();
}
必要条件
要件 | 価値 |
---|---|
サポートされる最小クライアント | Windows 10 |
ターゲット プラットフォーム の | ウィンドウズ |
ヘッダー | ufxclient.h |
ライブラリ | ufxstub.lib |
IRQL | DISPATCH_LEVEL |