This function returns the gain setting of the microphone of the specified phone's hookswitch device.
LONG TSPIAPI TSPI_phoneGetGain(HDRVPHONEhdPhone,DWORDdwHookSwitchDev,LPDWORDlpdwGain);
Parameters
- hdPhone
Handle to the phone whose gain is to be retrieved. - dwHookSwitchDev
Hookswitch device whose gain level is queried. This parameter may be one and only one of thePHONEHOOKSWITCHDEV constants. - lpdwGain
Pointer to a DWORD-sized ___location into which the service provider writes the current gain setting of the hookswitch microphone component. The dwGain gain parameter specifies the volume level of the hookswitch 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.
Return Values
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_INVALHOOKSWITCHDEV | The hookswitch device is invalid. |
PHONEERR_OPERATIONUNAVAIL | The operation is unavailable. |
PHONEERR_NOMEM | Not enough memory is available. |
Requirements
OS Versions: Windows CE 3.0 and later.
Header: Tapicomn.h.
Link Library: Coredll.lib.
See Also
TSPI_phoneGetDevCaps | TSPI_phoneSetGain
Send Feedback on this topic to the authors