Platform SDK: TAPI |
The following code snippet demonstrates creating a call object, discovering the streams associated with the call, selecting and creating appropriate terminals, selecting the terminals onto the streams, and completing the connection.
Before using this code snippet, 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 snippet does not have the error checking and releases appropriate for real code.
// Specify the destination address. // // szAddressToCall and // dwAddressType have been // retrieved from a user interface. ITBasicCallControl * pBasicCall bstrAddressToCall = SysAllocString( szAddressToCall ); pAddress->CreateCall( bstrAddressToCall, dwAddressType, &pBasicCall ); // Create the required terminals for this call. { // See the Select a Terminal code snippet. } // Make the connection. pBasicCall->Connect( TRUE );
Set gobjCall = gobjOrigAddress.CreateCall(_ strDestAddress, nSelectedType, lMediaTypes) 'Create the required terminals for this call. { 'See the Select a Terminal code snippet. } 'Connect the call; False means that the call is made asynchronously. gobjCall.Connect (False)
ITAddress::CreateCall, ITBasicCallControl, ITBasicCallControl::Connect