SoundSentryProc callback function

The SoundSentryProc function is an application-specific callback function that produces a customized visual signal when the SoundSentry accessibility feature is on and a Windows-based application (or an application running in a window) generates a sound through the computer's built-in speaker.

Syntax

LRESULT CALLBACK SoundSentryProc(
   DWORD dwMillisec,
   DWORD fdwEffect
);

Parameters

  • dwMillisec
    Type: DWORD

    The duration, in milliseconds, of the visual signal that is displayed.

  • fdwEffect
    Type: DWORD

    The type of visual signal to display. Currently, this value must always be SSWF_CUSTOM.

Return value

Type: LRESULT

If the visual signal was or will be displayed correctly, the return value is TRUE. If the signal is asynchronous and the status is not available when the function is called, it should return TRUE.

If an error prevented the signal from being displayed, the return value is FALSE. To get extended error information, call GetLastError.

Remarks

The SoundSentryProc function must be defined in a DLL, and the DLL must export a function with the name SoundSentryProc.

The SoundSentryProc function is called only after an application or library calls the SystemParametersInfo function, specifying the SPI_SETSOUNDSENTRY value and the address of a SOUNDSENTRY structure whose iWindowsEffect member is set to SSWF_CUSTOM.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

See also

Accessibility Functions

SOUNDSENTRY

SystemParametersInfo