UdecxWdfDeviceTryHandleUserIoctl function (udecxwdfdevice.h)

Attempts to handle an IOCTL request sent by a user-mode software.

Syntax

BOOLEAN UdecxWdfDeviceTryHandleUserIoctl(
       WDFDEVICE  UdecxWdfDevice,
  [in] WDFREQUEST Request
);

Parameters

UdecxWdfDevice

A handle to a framework device object that represents the controller. The client driver initialized this object in the previous call to UdecxWdfDeviceAddUsbDeviceEmulation.

[in] Request

A handle to a framework request object that represents the IOCTL request.

Return value

TRUE indicates that USB device emulation class extension (UdeCx) recognized and completed the request (with success or failure). In this case, the client driver must not complete the request. FALSE otherwise; the driver must complete the request.

Remarks

The UDE client driver presents itself to user-mode software as a host controller driver. The client driver registers and exposes the GUID_DEVINTERFACE_USB_HOST_CONTROLLER device interface GUID. User-mode software can open a handle to the device by specifying that GUID. By using that handle, the software can send IOCTL requests.

Note  Note that other interface's IOCTL codes may overlap with the USB host controller interface. If such I/O reaches this function the IOCTL will not be handled correctly.
 
The client driver does not need to process the received IOCTL. It can send the request to the class extension by calling UdecxWdfDeviceTryHandleUserIoctl. If the class extension recognizes the request as a standard request, it completes it. Otherwise, the call fails and the client driver is then expected to complete the request. For a list of IOCTLs that must be handled, see USB IOCTLs for applications and services.

Requirements

Requirement Value
Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Target Platform Windows
Minimum KMDF version 1.15
Header udecxwdfdevice.h (include Udecx.h)
Library Udecxstub.lib
IRQL PASSIVE_LEVEL

See also

Architecture: USB Device Emulation (UDE)

Write a UDE client driver