次の方法で共有


phoneSetStatusMessages (Compact 2013)

3/26/2014

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.

Requirements

Header

tapi.h

Library

TAPI32.dll

See Also

Reference

TAPI Phone Device Functions
phoneGetDevCaps
phoneInitializeEx
phoneOpen