Platform SDK: TAPI |
The following code snippet demonstrates creation of the TAPI object.
Note This snippet does not have the error checking and releases appropriate for real code.
// Initialize COM CoInitializeEx( NULL, COINIT_MULTITHREADED ); // Create a TAPI entry point object. CoCreateInstance( CLSID_TAPI, NULL, CLSCTX_INPROC_SERVER, IID_ITTAPI, (LPVOID *)&gpTapi ); // Initialize TAPI gpTapi->Initialize();
'Usually declared globally Dim gobjTapi As TAPI Dim glRegistrationToken As Long Dim gobjReceivedCallInfo As ITCallInfo Dim gbSupportedCall As Boolean 'Usually performed during form load 'Create the tapi object. Set gobjTapi = New TAPI 'Call Initialize before calling any other TAPI function. Call gobjTapi.Initialize