k***@gmail.com
2013-05-24 01:14:28 UTC
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();
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();