SetupDiGetClassInstallParams

BOOLEAN
SetupDiGetClassInstallParams(
IN HDEVINFO DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData, /* optional */
OUT PSP_CLASSINSTALL_HEADER ClassInstallParams, /* optional */
IN DWORD ClassInstallParamsSize,
OUT PDWORD
RequiredSize /* optional */
);

SetupDiGetClassInstallParams retrieves class install parameters for a device information set or a particular device information element.

Parameters

DeviceInfoSet

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

DeviceInfoData

Supplies a pointer to an SP_DEVINFO_DATA structure that contains the class install parameters to retrieve. If this parameter is not specified, the class install parameters retrieved are associated with the device information set for the global class driver list.

ClassInstallParams

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

ClassInstallParamsSize

Supplies 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

Supplies a pointer to a variable to receive the number of bytes required to store the class install parameters.

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.

Comments

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

See Also

SetupDiSetClassInstallParams