UdecxUsbDeviceInitAllocate function (udecxusbdevice.h)

Allocates memory for a UDECXUSBDEVICE_INIT structure that is used to initialize a virtual USB device.


PUDECXUSBDEVICE_INIT UdecxUsbDeviceInitAllocate(
  [in] WDFDEVICE UdecxWdfDevice


[in] UdecxWdfDevice

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

Return value

This method returns a pointer to an opaque UDECXUSBDEVICE_INIT that contains the initialization parameters. The structure is allocated by the USB device emulation class extension (UdeCx).


The UDE client driver calls this method to allocate parameters for the virtual device that is created by a subsequent call to UdecxUsbDeviceCreate. If the device is not created or the driver is finished using the resources, the driver must free the resources by calling UdecxUsbDeviceInitFree.


Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Target Platform Windows
Minimum KMDF version 1.15
Header udecxusbdevice.h (include Udecx.h)
Library Udecxstub.lib

See also

Architecture: USB Device Emulation (UDE)

Write a UDE client driver