USBD_BuildRegisterCompositeDevice function (usbdlib.h)

The USBD_BuildRegisterCompositeDevice routine is called by the driver of a USB multi-function device (composite driver) to initialize a REGISTER_COMPOSITE_DEVICE structure with the information required for registering the driver with the USB driver stack.

The routine is called by a driver that replaces the Microsoft-provided composite driver, Usbccgp.sys.

Syntax

void USBD_BuildRegisterCompositeDevice(
  [in]  USBD_HANDLE                   USBDHandle,
  [in]  COMPOSITE_DEVICE_CAPABILITIES CapabilityFlags,
  [in]  ULONG                         FunctionCount,
  [out] PREGISTER_COMPOSITE_DEVICE    RegisterCompositeDevice
);

Parameters

[in] USBDHandle

A USBD handle that is retrieved in a previous call to the USBD_CreateHandle routine.

[in] CapabilityFlags

A caller-allocated COMPOSITE_DEVICE_CAPABILITIES structure that indicates the capabilities that are supported by the composite driver. For instance, to indicate that the composite driver supports function suspend, set the CapabilityFunctionSuspend member of COMPOSITE_DEVICE_CAPABILITIES to 1.

[in] FunctionCount

The number of physical device objects (PDOs) to be created by the parent driver. The FunctionCount value cannot exceed 255.

[out] RegisterCompositeDevice

A pointer to a caller-allocated REGISTER_COMPOSITE_DEVICE structure. Upon completion, the structure is populated with the specified registration information. To register the composite driver, send the IOCTL_INTERNAL_USB_REGISTER_COMPOSITE_DEVICE I/O request and pass the populated structure.

Return value

None

Requirements

Requirement Value
Minimum supported client Requires WDK for Windows 8. Targets Windows Vista and later versions of the Windows operating system.
Target Platform Desktop
Header usbdlib.h
Library Usbdex.lib
IRQL < = DISPATCH_LEVEL

See also

IOCTL_INTERNAL_USB_REGISTER_COMPOSITE_DEVICE

REGISTER_COMPOSITE_DEVICE