Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 2 KB

make-a-call.md

File metadata and controls

68 lines (47 loc) · 2 KB
description ms.assetid title ms.topic ms.date
The following code example demonstrates how to create a call object, discover the streams associated with the call, select and create appropriate terminals, select the terminals onto the streams, and complete the connection.
49815b18-a8ea-46e0-b2a4-3d7a82e727b0
Make a Call
article
05/31/2018

Make a Call

The following code example demonstrates how to create a call object, discover the streams associated with the call, select and create appropriate terminals, select the terminals onto the streams, and complete the connection.

Before using this code example, you must perform the operations in Initialize TAPI and Select an Address.

Also, you must perform the operations illustrated in Select a Terminal following the call to ITAddress::CreateCall.

Note

This example does not have the error checking and releases appropriate for production code.

 

// Specify the destination address.
//
// szAddressToCall and 
// dwAddressType have been
// retrieved from a user interface.
ITBasicCallControl * pBasicCall
bstrAddressToCall = SysAllocString( szAddressToCall );
// If ( bstrAddressToCall == NULL ) process the error here. 

HRESULT hr = pAddress->CreateCall(
    bstrAddressToCall,
    dwAddressType,
    &pBasicCall
 );
// If ( hr != S_OK ) process the error here. 

SysFreeString(bstrAddressToCall);

// Create the required terminals for this call.
{
    // See the Select a Terminal code example.
}

// Make the connection.
pBasicCall->Connect( TRUE );

Related topics

ITAddress::CreateCall

ITBasicCallControl

ITBasicCallControl::Connect