Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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 DWORDto 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 phoneGetStatusfunction. This parameter uses one or more of the PHONEHOOKSWITCHDEVconstants.
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_STATEmessage.
Note: |
---|
This function is for TAPI version 2.0 and later. |
Requirements
Header | tapi.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |