ITLegacyCallMediaControl2::GenerateCustomTonesByCollection method (tapi3if.h)

The GenerateCustomTonesByCollection method generates the specified custom tone.

This method is intended for Visual Basic and scripting applications. C/C++ applications should use the GenerateCustomTones method instead.

Syntax

HRESULT GenerateCustomTonesByCollection(
  [in] ITCollection2 *pCustomToneCollection,
  [in] long          lDuration
);

Parameters

[in] pCustomToneCollection

Pointer to an ITCollection2 interface containing a collection of ITCustomTone interface pointers representing the tone's components. If the collection is a multifrequency tone, the various tones are played simultaneously.

[in] lDuration

The duration, in milliseconds, during which the tone should be sustained. A value of zero uses a default duration.

Return value

This method can return one of these values.

Return code Description
S_OK
Method succeeded.
E_POINTER
The pCustomToneCollection parameter is not a valid pointer.
E_OUTOFMEMORY
There is not enough memory to allocate the tones buffer.
TAPI_E_INVALCALLSTATE
The call must be in the connected state.

Remarks

This method translates to a call to the TAPI 2.x lineGenerateTone function.

When tone generation finishes, an event of type TE_GENERATEEVENT is generated.

Requirements

Requirement Value
Target Platform Windows
Header tapi3if.h
Library Uuid.lib
DLL Tapi3.dll

See also

ITCollection2

ITCustomTone

ITLegacyCallMediaControl2