Expand Minimize

SetupDiGetClassInstallParams function

The SetupDiGetClassInstallParams function retrieves class installation parameters for a device information set or a particular device information element.

Syntax


BOOL SetupDiGetClassInstallParams(
  _In_       HDEVINFO                DeviceInfoSet,
  _In_opt_   PSP_DEVINFO_DATA        DeviceInfoData,
  _Out_opt_  PSP_CLASSINSTALL_HEADER ClassInstallParams,
  _In_       DWORD                   ClassInstallParamsSize,
  _Out_opt_  PDWORD                  RequiredSize
);

Parameters

DeviceInfoSet [in]

A handle to a device information set that contains the class install parameters to retrieve.

DeviceInfoData [in, optional]

A pointer to an SP_DEVINFO_DATA structure that specified a device information element in DeviceInfoSet. This parameter is optional and can be NULL. If this parameter is specified, SetupDiGetClassInstallParams retrieves the class installation parameters for the specified device. If this parameter is NULL, SetupDiGetClassInstallParams retrieves the class install parameters for the global class driver list that is associated with DeviceInfoSet.

ClassInstallParams [out, optional]

A pointer to a buffer that contains an SP_CLASSINSTALL_HEADER structure. This structure must have its cbSize member set to sizeof(SP_CLASSINSTALL_HEADER) on input or the buffer is considered to be invalid. On output, the InstallFunction member is filled with the device installation function code for the class installation parameters being retrieved. If the buffer is large enough, it also receives the class installation parameters structure specific to the function code. If ClassInstallParams is not specified, ClassInstallParamsSize must be 0.

ClassInstallParamsSize [in]

The size, in bytes, of the ClassInstallParams buffer. If the buffer is supplied, it must be at least as large as sizeof(SP_CLASSINSTALL_HEADER). If the buffer is not supplied, ClassInstallParamsSize must be 0.

RequiredSize [out, optional]

A pointer to a variable of type DWORD that receives the number of bytes required to store the class install parameters. This parameter is optional and can be NULL.

Return value

The function returns TRUE if it is successful. Otherwise, it returns FALSE and the logged error can be retrieved with a call to GetLastError.

Remarks

The class install parameters are specific to a particular device installation function code that is stored in the ClassInstallHeader field located at the beginning of the ClassInstallParams buffer.

Requirements

Target platform

Desktop

Version

Available in Microsoft Windows 2000 and later versions of Windows.

Header

Setupapi.h (include Setupapi.h)

Library

Setupapi.lib

See also

SetupDiSetClassInstallParams

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft