TSPI_phoneGetHookSwitch
A version of this page is also available for
4/8/2010
This function returns the current hookswitch mode of the specified open phone device.
Syntax
LONG TSPIAPI TSPI_phoneGetHookSwitch(
HDRVPHONE hdPhone,
LPDWORD lpdwHookSwitchDevs
);
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_phoneGetStatusfunction.
Return Value
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
Header | tapicomn.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |