Discussion:
CTAPIEventNotification
(too old to reply)
k***@gmail.com
2013-05-24 01:14:28 UTC
Permalink
Hi,

I am unable to use "CTAPIEventNotification" in Tapi example .
Can anyone specify the required header file?

using below code from "http://msdn.microsoft.com/en-us/library/windows/desktop/ms734177%28v=vs.85%29.aspx:"




// Example 2: Register the event interface.
//
long gulAdvise; // Globally declared
IConnectionPointContainer * pCPC;
IConnectionPoint * pCP;
IUnknown * pUnk;

// Get the connection point container interface pointer from the TAPI object.
hr = gpTapi->QueryInterface(
IID_IConnectionPointContainer,
(void **)&pCPC
);
// If ( hr != S_OK O) process the error here.

// Get the ITTAPIEventNotification interface pointer from the container.
hr = pCPC->FindConnectionPoint(
IID_ITTAPIEventNotification,
&pCP
);
// If ( hr != S_OK O) process the error here.

pCPC->Release();

// Create a private event notification object.
CTAPIEventNotification* pTapiEventNotification = new CTAPIEventNotification;

hr = pTapiEventNotification->QueryInterface(
IID_IUnknown,
(void **)&pUnk
);
// If ( hr != S_OK O) process the error here.

// Call the advise method to give TAPI the IUnknown pointer for the event handler.
hr = pCP->Advise(
pUnk,
(ULONG *)&gulAdvise
);
// If ( hr != S_OK O) process the error here.

pCP->Release();
k***@gmail.com
2013-05-24 01:24:19 UTC
Permalink
I get an error as : "CTAPIEventNotification : undeclared identifier"
I have tried using below header files:
#include "Tapi3.h"
#include "Tapi3if.h"
#include "tapi.h"
#include "Tspi.h"
Andreas Marschall [exMVP TAPI]
2013-05-24 10:40:12 UTC
Permalink
Post by k***@gmail.com
I get an error as : "CTAPIEventNotification : undeclared identifier"
You need to implement this yourself as:
class CTAPIEventNotification : public ITTAPIEventNotification

An example can be found in some TAPI3 C++ samples (Incoming, FileTerm, AnsMach) from MS P-SDK. See CallNot.h/cpp in those projects.
A backup of these MS samples can be found here:
http://www.tapi.info/default.aspx/TAPI/PSDKSamples.html
Post by k***@gmail.com
#include "Tapi3.h"
This is the correct #include for TAPI 3.x
Post by k***@gmail.com
#include "Tapi3if.h"
#include "tapi.h"
Those are automatically included from within Tapi3.h
Post by k***@gmail.com
#include "Tspi.h"
This is only to be included by a TSP project.
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
My Toto® Tools (a collection of free, mostly TAPI related tools):
http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm
* Please post all messages and replies to the group so all may
* benefit from the discussion. Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no rights.
Loading...