phoneSetStatusMessages function (tapi.h)

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

Syntax

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

Parameters

hPhone

Handle to the open phone device to be monitored.

dwPhoneStates

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

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

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 value

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

   
Target Platform Windows
Header tapi.h
Library Tapi32.lib
DLL Tapi32.dll

See also

PHONECAPS

PHONE_CLOSE

PHONE_STATE

Supplementary Phone Service Functions

TAPI 2.2 Reference Overview

phoneGetDevCaps

phoneInitialize

phoneInitializeEx

phoneOpen