User32SystemParametersInfo(SystemParametersActionFlags, Boolean, UInt32, SystemParametersWinIniFlags) Method

Retrieves or sets the value of one of the system-wide parameters.

This function can also update the user profile while setting a parameter.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static bool SystemParametersInfo(
	SystemParametersActionFlags action,
	bool uiParam,
	uint pvParam,
	SystemParametersWinIniFlags winIni
)

Parameters

action  SystemParametersActionFlags
The system-wide parameter to be retrieved or set.
uiParam  Boolean
A parameter whose usage and format depends on the system parameter being queried or set.

For more information about system-wide parameters, see the parameter; If not otherwise indicated, you must specify '0' for this parameter.

pvParam  UInt32
A parameter whose usage and format depends on the system parameter being queried or set.

For more information about system-wide parameters, see the parameter; If not otherwise indicated, you must specify for this parameter.

For information on the PVOID datatype, see Windows Data Types.

winIni  SystemParametersWinIniFlags
If a system parameter is being set, specifies whether the user profile is to be updated, and if so, whether the WM_SETTINGCHANGE message is to be broadcast to all top-level windows to notify them of the change.

This parameter can be '0' if you do not want to update the user profile or broadcast the WM_SETTINGCHANGE message.

Return Value

Boolean
If the function succeeds, the return value is . If the function fails, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also