phoneGetHookSwitch (Compact 2013)
3/26/2014
This function returns the current hookswitch mode of the specified open phone device.
Syntax
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 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_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.
Requirements
Header |
tapi.h |
Library |
TAPI32.dll |
See Also
Reference
TAPI Phone Device Functions
phoneGetStatus
phoneGetStatusMessages