[This is preliminary documentation and subject to change.]
The SetMessageWaitingIndicator function updates the computer's message waiting indicator. Applications use this feature while the computer is in a low power state to indicate to the user that new e-mail, fax, or voice messages have arrived.
BOOL SetMessageWaitingIndicator(
HANDLE hIndicator, // application-defined 32-bit value
ULONG cmsg // number of messages waiting
);
If the computer does not have a message waiting indicator, the function returns zero. Otherwise, it returns a nonzero value.
The system tracks calls to SetMessageWaitingIndicator on a per-handle basis. It combines the number specified in the cmsg parameter with the current value of the message-waiting indicator and displays the result. If the process exits, either normally or abnormally, the system automatically closes all handles. This reduces the value of the indicator by the amount specified in the application's last call to SetMessageWaitingIndicator.
Windows NT: Requires version 5.0 or later.
Windows: Requires Windows 98.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.
Power Management Overview, Power Management Functions, CreateFile, GetDevicePowerState