Syntax | LONG TSPI_phoneGetHookSwitch(dwRequestID, hdPhone, lpdwHookSwitchDevs) This function returns the current hook switch mode of the specified open phone device. |
Parameters | DRV_REQUESTID dwRequestID Specifies the identifier of the asynchronous request. The Service Provider returns this value if the function completes asynchronously. |
HDRVPHONE hdPhone Specifies the Service Provider's opaque handle to the phone whose hook switch mode is to be retrieved. | |
LPDWORD lpdwHookSwitchDevs Specifies a far pointer to a DWORD-sized location to be filled with the mode of the phone's hookswitch devices, of type PHONEHOOKSWITCHDEV. If a bit position is FALSE, then the corresponding hookswitch device is on hook; if TRUE, then the mic and/or speaker part of the corresponding hookswitch device is offhook. To find out whether mic and/or speaker are enabled, the TAPI DLL can use TSPI_phoneGetStatus. Values for lpdwHookSwitchDevs are: | |
PHONEHOOKSWITCHDEV_HANDSET This is the phone's handset. | |
PHONEHOOKSWITCHDEV_SPEAKER This is the phone's speakerphone or adjunct. | |
PHONEHOOKSWITCHDEV_HEADSET This is the phone's headset. | |
Return Value | Returns zero if the function is successful, the (positive) dwRequestID value if the function will be completed asynchronously, or a negative error number if an error has occurred. Possible error returns are: |
PHONEERR_INVALPHONEHANDLE The specified device handle is invalid. | |
PHONEERR_INVALPOINTER The specified pointer parameter is invalid. | |
PHONEERR_INVALPHONESTATE The phone device is not in a valid state for the requested operation. | |
PHONEERR_OPERATIONUNAVAIL The specified operation is not available. | |
PHONEERR_OPERATIONFAILED The specified operation failed for unspecified reasons. | |
Comments | After the hookswitch state of a device changes, and if hookswitch monitoring is enabled, the TAPI DLL is sent a PHONE_STATE message. |
See Also | Functions: TSPI_phoneSetHookSwitch Messages: PHONE_STATE Data types: PHONESTATUS, PHONEHOOKSWITCHDEV |