phoneSetStatusMessages (Windows CE 5.0)
This 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
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 Values
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
OS Versions: Windows CE 3.0 and later.
Header: Tapi.h.
Link Library: Coredll.lib.
See Also
phoneGetDevCaps | phoneInitializeEx | phoneOpen
Send Feedback on this topic to the authors