次の方法で共有


TSPI_phoneSetGain (Compact 2013)

3/26/2014

This function sets the gain of the microphone of the specified hookswitch device to the specified gain level.

Syntax

LONG TSPIAPI TSPI_phoneSetGain(
  DRV_REQUESTID dwRequestID,  
  HDRVPHONE hdPhone, 
  DWORD dwHookSwitchDev,  
  DWORD dwGain 
);

Parameters

  • dwRequestID
    Identifier of the asynchronous request.
  • hdPhone
    Handle to the phone containing the hookswitch device whose gain is to be set.
  • dwHookSwitchDev
    Hookswitch device whose microphone's gain is to be set. This parameter uses one and only one of the PHONEHOOKSWITCHDEV_ Constants.
  • dwGain
    DWORD-sized location containing the desired new gain setting of the device. This is a number in the range from 0x00000000 (silence) through 0x0000FFFF (maximum volume). The actual granularity and quantization of gain settings in this range are service-provider-specific. A value for dwGain that is out of range is clamped by TAPI to the nearest in-range value.

Return Value

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. 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_INVALHOOKSWITCHDEV

The hookswitch device is invalid.

PHONEERR_OPERATIONUNAVAIL

The operation is unavailable.

PHONEERR_NOMEM

Not enough memory is available.

Requirements

Header

tspi.h

Library

CellTSP.dll

See Also

Reference

TSPI Phone Device Functions
TSPI_phoneGetDevCaps