SetupDiInstallDeviceInterfaces function

The SetupDiInstallDeviceInterfaces function is the default handler for the DIF_INSTALLINTERFACES installation request.

Syntax

WINSETUPAPI BOOL SetupDiInstallDeviceInterfaces(
  HDEVINFO         DeviceInfoSet,
  PSP_DEVINFO_DATA DeviceInfoData
);

Parameters

DeviceInfoSet

A pointer to the device information set that contains a device information element that represents the device for which to install interfaces. The device information set must contain only elements for the local system.

DeviceInfoData

A pointer to an SP_DEVINFO_DATA structure that specifies the device information element in DeviceInfoSet.

Return Value

SetupDiInstallDeviceInterfaces returns TRUE if the function completed without error. If the function completed with an error, FALSE is returned and the error code for the failure can be retrieved by calling GetLastError.

Remarks

SetupDiInstallDeviceInterfaces processes each AddInterface entry in the DDInstall.Interfaces section of a device INF file and creates each interface by calling SetupDiCreateDeviceInterface.

The caller of SetupDiInstallDeviceInterfaces must be a member of the Administrators group.

Note  Only a class installer should call SetupDiInstallDeviceInterfaces and only in those situations where the class installer must perform device interface installation operations after SetupDiInstallDeviceInterfaces completes the default device interface installation operation. In such situations, the class installer must directly call SetupDiInstallDeviceInterfaceswhen the installer processes a DIF_INSTALLINTERFACES request. For more information about calling the default handler, see Calling Default DIF Code Handlers.
 
For information about INF file format, see INF File Sections and Directives.

Requirements

   
Windows version Available in Microsoft Windows 2000 and later versions of Windows.
Target Platform Desktop
Header setupapi.h (include Setupapi.h)
Library Setupapi.lib
DLL Setupapi.dll

See Also

DIF_INSTALLINTERFACES

SetupDiCreateDeviceInterface