Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function queries or sets system-wide parameters, and updates the user profile during the process.
BOOL SystemParametersInfo ( UINT uiAction , UINT uiParam , PVOID pvParam , UINT fWinIni );
Parameters
Value | Description |
---|---|
SPI_APPBUTTONCHANGE | For Windows CE for Pocket PC and Palm-size PC, gets the application button mappings. |
SPI_GETBATTERYIDLETIMEOUT | Gets the amount of time that Windows CE will stay on with battery power before it suspends due to user inaction. The pvParamparameter points to a DWORDthat returns the time in seconds. This flag is ignored if pvParamis zero. |
SPI_GETEXTERNALIDLETIMEOUT | Gets the amount of time that Windows CE will stay on with AC power before it suspends due to user inaction. The pvParamparameter points to a DWORDthat returns the time in seconds. This flag is ignored if pvParamis zero. |
SPI_GETMOUSE | Retrieves the two mouse threshold values and the mouse speed. |
SPI_GETOEMINFO | Returns a string containing the model number and manufacturer name. The uiParamparameter specifies the length of the buffer in pvParam, which on successful return contains the string in Unicode characters. |
SPI_GETPLATFORMTYPE | Returns a string specifying the type of Windows CE device, such as "H/PC." The uiParamparameter specifies the length of the buffer in pvParam, which on successful return contains the string in Unicode characters. This string allows applications like Pocket Internet Explorer to determine the device type. |
SPI_GETWAKEUPIDLETIMEOUT | Gets the amount of time that Windows CE will stay on after a user notification that reactivates a suspended device. The pvParamparameter points to a DWORDthat returns the time in seconds. This flag is ignored if pvParamis zero. |
SPI_GETWORKAREA | Retrieves the size of the work area on the primary
screen. The work area is the portion of the screen not obscured by
the system task bar or by toolbars displayed on the desktop by
applications. The
pvParamparameter must point to a
RECTstructure that
receives the coordinates of the work area, expressed in virtual
screen coordinates.
To get the work area of a screen other than the primary screen, call the GetMonitorInfofunction. |
SPI_SETBATTERYIDLETIMEOUT | Sets the amount of time that Windows CE will stay on with battery power before it suspends due to user inaction. The Windows CE operating system will remain on, with battery power, as long as the keyboard or touch screen is active. The uiParamparameter specifies the time to set in seconds. This flag is ignored if uiParamis set to zero. |
SPI_SETCURRENTIM | Sets the class identifier (CLSID) of an input method. The pvParamparameter points to a CLSIDstructure |
SPI_SETDESKWALLPAPER | For Windows CE versions 2.12 and later, sets the desktop wallpaper. The value of the pvParamparameter determines the new wallpaper. To specify a wallpaper bitmap, set pvParamto point to a null-terminated string containing the name of a bitmap file. Setting pvParamto "" removes the wallpaper. Setting pvParamto SETWALLPAPER_DEFAULT or NULL reverts to the default wallpaper. |
SPI_SETEXTERNALIDLETIMEOUT | Sets the amount of time that Windows CE will stay on with AC power before it suspends due to user inaction. The Windows CE operating system will remain on, with AC power, as long as the keyboard or touch screen is active. The uiParamparameter specifies the time in seconds. This flag is ignored if uiParamis set to zero. |
SPI_SETMOUSE | Sets the two mouse threshold values and the mouse speed. |
SPI_SETSIPINFO | Sets input panel information. The pvParamparameter points to a SIPINFOstructure. |
SPI_SETWAKEUPIDLETIMEOUT | Sets the amount of time that Windows CE will stay on after a user notification that reactivates the suspended device. The uiParamparameter specifies the time in seconds. This flag is ignored if uiParamis set to zero. |
SPI_SETWORKAREA | Sets the size of the work area—the portion of the
screen not obscured by the system taskbar or by toolbars displayed
on the desktop by applications. The
pvParamparameter is a pointer to a
RECTstructure that specifies the new work area rectangle,
expressed in virtual screen coordinates. In a system with multiple
screens, the function sets the work area of the monitor that
contains the specified rectangle.
If pvParamis NULL, the function sets the work area of the primary screen to the full screen. |
If the pvParambuffer is used to get the platform type or OEM information string and the buffer is too small, this function fails with ERROR_INSUFFICIENT_BUFFER in the last error.
Value | Description |
---|---|
SPIF_UPDATEINIFILE | Writes the new system-wide parameter setting to the user profile. |
SPIF_SENDCHANGE | Broadcasts the WM_SETTINGCHANGE message after updating the user profile. |
Return Values
Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.
Remarks
This function is intended for use with applications, such as the Control Panel, that allow the user to customize the environment.
Windows CE supports only the Unicode version of this function.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Winuser.h | Coredll.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
GetLastError, GetSystemMetrics, WM_SETTINGCHANGE, SIPINFO