SetupDiGetDeviceInstallParamsW function (setupapi.h)
The SetupDiGetDeviceInstallParams function retrieves device installation parameters for a device information set or a particular device information element.
Syntax
WINSETUPAPI BOOL SetupDiGetDeviceInstallParamsW(
[in] HDEVINFO DeviceInfoSet,
[in, optional] PSP_DEVINFO_DATA DeviceInfoData,
[out] PSP_DEVINSTALL_PARAMS_W DeviceInstallParams
);
Parameters
[in] DeviceInfoSet
A handle to the device information set that contains the device installation parameters to retrieve.
[in, optional] DeviceInfoData
A pointer to an SP_DEVINFO_DATA structure that specifies the device information element in DeviceInfoSet. This parameter is optional and can be NULL. If this parameter is specified, SetupDiGetDeviceInstallParams retrieves the installation parameters for the specified device. If this parameter is NULL, the function retrieves the global device installation parameters that are associated with DeviceInfoSet.
[out] DeviceInstallParams
A pointer to an SP_DEVINSTALL_PARAMS structure that receives the device install parameters. DeviceInstallParams.cbSize must be set to the size, in bytes, of the structure before calling this function.
Return value
The function returns TRUE if it is successful. Otherwise, it returns FALSE and the logged error can be retrieved by making a call to GetLastError.
Remarks
Note
The setupapi.h header defines SetupDiGetDeviceInstallParams as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available in Microsoft Windows 2000 and later versions of Windows. |
Target Platform | Desktop |
Header | setupapi.h (include Setupapi.h) |
Library | Setupapi.lib |
API set | ext-ms-win-setupapi-classinstallers-l1-1-0 (introduced in Windows 8) |