Share via


TSPI_phoneSetHookSwitch

The TSPI_phoneSetHookSwitch 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.

LONG TSPIAPI TSPI_phoneSetHookSwitch(
DRV_REQUESTID dwRequestID,  
HDRVPHONE hdPhone,      
DWORD dwHookSwitchDevs,  
DWORD dwHookSwitchMode );

Parameters

  • dwRequestID
    The identifier of the asynchronous request.
  • hdPhone
    The handle to the phone containing the hookswitch devices whose modes are to be set.
  • dwHookSwitchDevs
    The device(s) whose hookswitch mode is to be set. This parameter uses one of the PHONEHOOKSWITCHDEV_ constants.
  • dwHookSwitchMode
    The hookswitch mode to set. This parameter can have only one of the PHONEHOOKSWITCHMODE_ constants.

Return Values

Returns dwRequestID or an error number if an error occurs. The lResult actual parameter of the corresponding ASYNC_COMPLETION is zero if the function succeeds or it is an error number if an error occurs. Possible return values are as follows:

PHONEERR_INVALPHONEHANDLE, PHONEERR_NOMEM, PHONEERR_INVALHOOKSWITCHDEV, PHONEERR_RESOURCEUNAVAIL, PHONEERR_INVALHOOKSWITCHMODE, PHONEERR_OPERATIONFAILED, PHONEERR_INVALPHONESTATE, PHONEERR_OPERATIONUNAVAIL.

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_STATE message is sent to the application after the hookswitch state has changed.

Requirements

Runs On Versions Defined in Include Link to
Windows CE OS 3.0 and later Tapicomn.h   Coredll.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

TSPI_phoneGetHookSwitch

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.