UcxUsbDeviceCreate function (ucxusbdevice.h)

Creates a USB device object on the specified controller.

Syntax

NTSTATUS UcxUsbDeviceCreate(
  [in]           UCXCONTROLLER          Controller,
  [out]          PUCXUSBDEVICE_INIT     *UsbDeviceInit,
  [in, optional] PWDF_OBJECT_ATTRIBUTES Attributes,
  [out]          UCXUSBDEVICE           *UsbDevice
);

Parameters

[in] Controller

A handle to the controller object. The client driver retrieved the handle in a previous call to UcxControllerCreate.

[out] UsbDeviceInit

A pointer to a UCXUSBDEVICE_INIT structure that describes various configuration operations for creating the USB device object. The driver specifies function pointers to its callback functions in this structure. This structure is managed by UCX.

[in, optional] Attributes

A pointer to a caller-allocated WDF_OBJECT_ATTRIBUTES structure that specifies attributes for the USB device object.

[out] UsbDevice

A pointer to a variable that receives a handle to the new USB device object.

Return value

The method returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method might return one an appropriate NTSTATUS error code.

Remarks

The client driver for the host controller must call this method after the WdfDeviceCreate call. The parent of the new USB device object is the parent hub device specified by UCX.

For a code example, see EVT_UCX_CONTROLLER_USBDEVICE_ADD.

Requirements

Requirement Value
Minimum supported client Windows 10
Target Platform Windows
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header ucxusbdevice.h (include Ucxclass.h)
IRQL PASSIVE_LEVEL

See also

EVT_UCX_CONTROLLER_USBDEVICE_ADD