TSPI_phoneSetVolume
A version of this page is also available for
4/8/2010
This function sets the volume of the speaker component of the specified hookswitch device to the specified level.
Syntax
LONG TSPIAPI TSPI_phoneSetVolume(
DRV_REQUESTID dwRequestID,
HDRVPHONE hdPhone,
DWORD dwHookSwitchDev,
DWORD dwVolume
);
Parameters
- dwRequestID
Identifier of the asynchronous request.
- hdPhone
Handle to the phone containing the speaker whose volume is to be set.
- dwHookSwitchDev
Hookswitch device whose speaker's volume is to be set. This parameter uses one of the PHONEHOOKSWITCHDEV constants.
- dwVolume
DWORD specifying the new volume level of the hookswitch device. This is a number in the range from 0x00000000 (silence) through 0x0000FFFF (maximum volume). The actual granularity of volume settings in this range are service-provider specific. A value for dwVolume that is out of range is clamped by TAPI to the nearest value in range.
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 | tapicomn.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |