Share via


TSPI_phoneGetHookSwitch (Windows CE 5.0)

Send Feedback

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

LONG TSPIAPI TSPI_phoneGetHookSwitch(HDRVPHONEhdPhone,LPDWORDlpdwHookSwitchDevs);

Parameters

  • hdPhone
    Service provider's opaque handle to the phone whose hookswitch mode is to be retrieved.
  • lpdwHookSwitchDevs
    Pointer to a DWORD-sized location into which the service provider writes the mode of the phone's hookswitch devices. This parameter uses one of the PHONEHOOKSWITCHDEV constants. 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 microphone and/or speaker are enabled, TAPI can use the TSPI_phoneGetStatus function.

Return Values

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

Value Description
PHONEERR_INVALPHONEHANDLE The handle to the phone is invalid.
PHONEERR_RESOURCEUNAVAIL The resource is unavailable.
PHONEERR_INVALPHONESTATE The phone state is invalid.
PHONEERR_OPERATIONFAILED The operation failed.
PHONEERR_NOMEM Not enough memory is available.
PHONEERR_OPERATIONUNAVAIL The operation is unavailable.

Remarks

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

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Tapicomn.h.
Link Library: Coredll.lib.

See Also

TSPI_phoneGetStatus | TSPI_phoneSetHookSwitch

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.