다음을 통해 공유


phoneSetStatusMessages (Windows Embedded CE 6.0)

1/6/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 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. 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 phoneSetStatusMessages function 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

See Also

Reference

phoneGetDevCaps
phoneInitializeEx
phoneOpen

Concepts

TAPI Phone Device Functions