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.
A version of this page is also available for
4/8/2010

The sound sentry option directs the OS to display a visual signal when a sound is generated by a Windows Embedded CE–based application.

The user can control the settings for the sound sentry option by using the Soundtab of the AccessibilityControl Panel application or another application for customizing the environment.

Applications use the SPI_GETSOUNDSENTRY and SPI_SETSOUNDSENTRY flags with the SystemParametersInfofunction to get and set the sound sentry option. The SOUNDSENTRYstructure defines the parameters for the sound sentry option. To set the sound sentry option, call SystemParametersInfowith the uiActionparameter set to SPI_SETSOUNDSENTRY, the uiParamparameter set to the size of the SOUNDSENTRYstructure, and the pvParamparameter set to a pointer to a SOUNDSENTRYstructure that contains the sound sentry parameters that you want to use. You should set the SSF_SOUNDSENTRYON flag in the dwFlagsmember of the SOUNDSENTRYstructure that you pass to SystemParametersInfo.

The following code example shows how to enable the sound sentry option and direct the OS to flash the entire screen when an application generates a sound.

Copy Code
SOUNDSENTRY ssf;
BOOL bSuccess;

// Fill in the members of the SOUNDSENTRY structure.

ssf.cbSize = sizeof(SOUNDSENTRY);
ssf.dwFlags = (SSF_AVAILABLE | SSF_SOUNDSENTRYON);
ssf.iFSTextEffect = 0;
ssf.iFSTextEffectMSec = 0;
ssf.iFSTextEffectColorBits = 0;
ssf.iFSGrafEffect = 0;
ssf.iFSGrafEffectMSec = 0;
ssf.iFSGrafEffectColor = 0;
ssf.iWindowsEffect = SSWF_DISPLAY;
ssf.iWindowsEffectMSec = 0;
ssf.lpszWindowsEffectDLL= NULL;
ssf.iWindowsEffectOrdinal = 0;

// Call SystemParametersInfo with the SPI_SETSOUNDSENTRY flag. 

bSuccess = SystemParametersInfo(SPI_SETSOUNDSSENTRY,
sizeof(SOUNDSENTRY), 
								(LPVOID) &ssf, 0); 

To retrieve information about the sound sentry option, call SystemParametersInfowith uiActionset to SPI_GETSOUNDSENTRY, uiParamset to the size of the SOUNDSENTRYstructure, and pvParamset to a pointer to a SOUNDSENTRYstructure. Examine the values of the members of the SOUNDSENTRYstructure after SystemParametersInforeturns to obtain the information that you want about the sound sentry option.

See Also