SetupDiSetDeviceInstallParamsA function (setupapi.h)
The SetupDiSetDeviceInstallParams function sets device installation parameters for a device information set or a particular device information element.
Syntax
WINSETUPAPI BOOL SetupDiSetDeviceInstallParamsA(
[in] HDEVINFO DeviceInfoSet,
[in, optional] PSP_DEVINFO_DATA DeviceInfoData,
[in] PSP_DEVINSTALL_PARAMS_A DeviceInstallParams
);
Parameters
[in] DeviceInfoSet
A handle to the device information set for which to set device installation parameters.
[in, optional] DeviceInfoData
A pointer to an SP_DEVINFO_DATA structure that specifies a device information element in DeviceInfoSet. This parameter is optional and can be set to NULL. If this parameter is specified, SetupDiSetDeviceInstallParams sets the installation parameters for the specified device. If this parameter is NULL, SetupDiSetDeviceInstallParams sets the installation parameters that are associated with the global class driver list for DeviceInfoSet.
[in] DeviceInstallParams
A pointer to an SP_DEVINSTALL_PARAMS structure that contains the new values of the parameters. The DeviceInstallParams.cbSize must be set to the size, in bytes, of the structure before this function is called.
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
All parameters are validated before any changes are made. Therefore, a return value of FALSE indicates that no parameters were modified.
Note
The setupapi.h header defines SetupDiSetDeviceInstallParams 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 |