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

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

Syntax

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

Parameters

hPhone

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 PHONESTATEconstants.

dwButtonModes

Set of phone-button modes for which the application can receive notification messages. This parameter can have zero, one, or more of the PHONEBUTTONMODEconstants.

dwButtonStates

Set of phone-button state changes for which the application can receive notification messages. If the dwButtonModesparameter is zero, dwButtonStatesis ignored. If dwButtonModeshas one or more bits set, this parameter must also have at least one bit set. This parameter uses the PHONEBUTTONSTATEconstants.

Return Value

Returns zero if the request succeeds or a negative error number if an error occurs. The following table shows the return values for this function.

Value Description

PHONEERR_INVALPHONEHANDLE

The handle to the open phone device is invalid.

PHONEERR_NOMEM

Not enough memory is available.

PHONEERR_INVALPHONESTATE

The phone state is invalid.

PHONEERR_RESOURCEUNAVAIL

The resources are unavailable.

PHONEERR_INVALBUTTONMODE

The button mode is invalid.

PHONEERR_OPERATIONFAILED

The operation failed.

PHONEERR_INVALBUTTONSTATE

The button state is invalid.

PHONEERR_UNINITIALIZED

A parameter is uninitialized.

PHONEERR_OPERATIONUNAVAIL

The operation is unavailable.

Remarks

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

Note:
This function is for TAPI version 2.0 and later.

Requirements

Header tapi.h
Library coredll.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also