phoneGetHookSwitch (Windows CE 5.0)

Send Feedback

This function returns the current hookswitch mode of the specified open phone device.

LONG WINAPI phoneGetHookSwitch(HPHONE hPhone,LPDWORD lpdwHookSwitchDevs);

Parameters

  • hPhone
    Handle to the open phone device.
  • lpdwHookSwitchDevs
    Pointer to a DWORD to be filled with the mode of the phone's hookswitch devices. If a bit position is FALSE, the corresponding hookswitch device is onhook; if TRUE, the microphone and/or speaker part of the corresponding hookswitch device is offhook. To find out whether the microphone and/or speaker are enabled, the application can use the phoneGetStatus function. This parameter uses one or more of the PHONEHOOKSWITCHDEV 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_INVALPOINTER The pointer is invalid.
PHONEERR_RESOURCEUNAVAIL The resources are unavailable.
PHONEERR_INVALPHONESTATE The phone state is invalid.
PHONEERR_OPERATIONFAILED The operation failed.
PHONEERR_OPERATIONUNAVAIL The operation is unavailable.
PHONEERR_UNINITIALIZED A parameter is uninitialized.

Remarks

After the hookswitch state of a device changes, and if hookswitch monitoring is enabled, the application is sent a PHONE_STATE message.

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

phoneGetStatus | phoneGetStatusMessages

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.