Platform SDK: TAPI

phoneSetStatusMessages

The phoneSetStatusMessages function enables an application to monitor the specified phone device for selected status events.

LONG WINAPI phoneSetStatusMessages(
  HPHONE hPhone,        
  DWORD dwPhoneStates,  
  DWORD dwButtonModes,  
  DWORD dwButtonStates  
);

Parameters

hPhone
A handle to the open phone device to be monitored.
dwPhoneStates
These flags specify the set of phone status changes and events for which the application can receive notification messages. This parameter can have zero, one, or more of the PHONESTATE_ Constants.
dwButtonModes
The set of phone-button modes for which the application can receive notification messages. This parameter can have zero, one, or more of the PHONEBUTTONMODE_ Constants.
dwButtonStates
The set of phone-button state changes for which the application can receive notification messages. If the dwButtonModes parameter is zero, dwButtonStates is ignored. If dwButtonModes has one or more bits set, this parameter must also have at least one bit set. This parameter uses the PHONEBUTTONSTATE_ Constants.

Return Values

Returns zero if the request succeeds or a negative error number if an error occurs. Possible return values are:

PHONEERR_INVALPHONEHANDLE, PHONEERR_NOMEM, PHONEERR_INVALPHONESTATE, PHONEERR_RESOURCEUNAVAIL, PHONEERR_INVALBUTTONMODE, PHONEERR_OPERATIONFAILED, PHONEERR_INVALBUTTONSTATE, PHONEERR_UNINITIALIZED, PHONEERR_OPERATIONUNAVAIL.

Remarks

An application can use the phoneSetStatusMessages function to enable or disable the generation of the corresponding messages. All phone status messages are disabled by default.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
  Windows 95/98: Requires Windows 95 or later.
  Version: Requires TAPI 1.3 or later.
  Header: Declared in Tapi.h.
  Library: Use Tapi32.lib.

See Also

TAPI 2.2 Reference Overview, Supplementary Phone Service Functions, PHONE_CLOSE, PHONE_STATE, PHONECAPS, phoneGetDevCaps, phoneInitialize, phoneInitializeEx, phoneOpen