Initialize TAPI

The following code example demonstrates creation of the TAPI object.

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


// Initialize COM.
HRESULT hr = CoInitializeEx(
     NULL,
     COINIT_MULTITHREADED
     );
// If (hr != S_OK) process the error here.  

// Create a TAPI entry point object.
ITTAPI *gpTapi;    // globally allocated 
hr = CoCreateInstance(
     CLSID_TAPI,
     NULL,
     CLSCTX_INPROC_SERVER,
     IID_ITTAPI,
     (LPVOID *)&gpTapi
     );
// If (hr != S_OK) process the error here.  

// Initialize TAPI.
hr = gpTapi->Initialize();
// If (hr != S_OK) process the error here. 


Related topics

ITTAPI::Initialize

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.