Expand Minimize

USBD_BuildRegisterCompositeDevice routine

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_  bcount(Size) PREGISTER_COMPOSITE_DEVICE RegisterCompositeDevice
);

Parameters

USBDHandle [in]

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

CapabilityFlags [in]

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.

FunctionCount [in]

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

RegisterCompositeDevice [out]

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

This routine does not return a value.

Requirements

Version

Requires WDK for Windows 8. Targets Windows Vista and later versions of the Windows operating system.

Header

Usbdlib.h

Library

Usbdex.lib

IRQL

< = DISPATCH_LEVEL

See also

REGISTER_COMPOSITE_DEVICE
IOCTL_INTERNAL_USB_REGISTER_COMPOSITE_DEVICE

 

 

Send comments about this topic to Microsoft

Build date: 12/5/2013

Show:
© 2014 Microsoft. All rights reserved.