次の方法で共有


TSPI_phoneGetHookSwitch (Compact 2013)

3/26/2014

This function returns the current hookswitch mode of the specified open phone device.

Syntax

LONG TSPIAPI TSPI_phoneGetHookSwitch(
  HDRVPHONE hdPhone, 
  LPDWORD lpdwHookSwitchDevs 
);

Parameters

  • hdPhone
    Service provider's opaque handle to the phone whose hookswitch mode is to be retrieved.
  • lpdwHookSwitchDevs
    Pointer to a DWORD-sized location into which the service provider writes the mode of the phone's hookswitch devices. This parameter uses one of the PHONEHOOKSWITCHDEV constants. 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 microphone and/or speaker are enabled, TAPI can use the TSPI_phoneGetStatus function.

Return Value

Returns zero if the function succeeds, or 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_RESOURCEUNAVAIL

The resource is unavailable.

PHONEERR_INVALPHONESTATE

The phone state is invalid.

PHONEERR_OPERATIONFAILED

The operation failed.

PHONEERR_NOMEM

Not enough memory is available.

PHONEERR_OPERATIONUNAVAIL

The operation is unavailable.

Remarks

After the hookswitch state of a device changes, and if hookswitch monitoring is enabled, TAPI is sent a PHONE_STATE message.

Requirements

Header

tspi.h

Library

CellTSP.dll

See Also

Reference

TSPI Phone Device Functions
TSPI_phoneGetStatus
TSPI_phoneSetHookSwitch