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 sets the hook state of the specified open phone's hookswitch devices to the specified mode. Only the hookswitch state of the hookswitch devices listed is affected.
Syntax
LONG TSPIAPI TSPI_phoneSetHookSwitch( DRV_REQUESTID dwRequestID, HDRVPHONE hdPhone, DWORD dwHookSwitchDevs, DWORD dwHookSwitchMode ); |
Parameters
- dwRequestID
-
Identifier of the asynchronous request.
- hdPhone
-
Handle to the phone containing the hookswitch devices whose modes are to be set.
- dwHookSwitchDevs
-
Devices whose hookswitch mode is to be set. This parameter uses one of the PHONEHOOKSWITCHDEVconstants.
- dwHookSwitchMode
-
Hookswitch mode to set. This parameter can have only one of the PHONEHOOKSWITCHMODE_ constants.
Return Value
Returns dwRequestIDor an error number if an error occurs. The lResultactual parameter of the corresponding ASYNC_COMPLETIONis zero if the function succeeds or it is 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_NOMEM |
Not enough memory is available. |
PHONEERR_INVALHOOKSWITCHDEV |
The hookswitch device is invalid. |
PHONEERR_RESOURCEUNAVAIL |
The resource is unavailable. |
PHONEERR_INVALHOOKSWITCHMODE |
The hookswitch mode is invalid. |
PHONEERR_OPERATIONFAILED |
The operation failed. |
PHONEERR_INVALPHONESTATE |
The phone state is invalid. |
PHONEERR_OPERATIONUNAVAIL |
The operation is unavailable. |
Remarks
The hookswitch mode is changed to the indicated setting for all devices specified. If different settings are desired, this function can be invoked multiple times with a different set of parameters. A PHONE_STATEmessage is sent to the application after the hookswitch state has changed.
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 |