📄 tapieventnotification.cpp
字号:
//-----------------------------------------------------------------------
// Copyright (c) 2002 Avaya Global SME Solutions
//-----------------------------------------------------------------------
// Project name: TAPI 3 Test Harness
// Module file : TAPIEventNotification.cpp
// Compiler : Visual C++ 6.0
//-----------------------------------------------------------------------
// Description : Implementation of the CTAPIEventNotification class.
//-----------------------------------------------------------------------
#include "stdafx.h"
#include "TAPIEventNotification.h"
// Construction/Destruction
CTAPIEventNotification::CTAPIEventNotification(DWORD dwThreadId)
{
m_dwRefCount = 0;
}
CTAPIEventNotification::~CTAPIEventNotification()
{
}
// CTAPIEventNotification::Event
//
// The only method in the ITCallEventNotification interface. This gets
// called by TAPI 3.0 when there is a call event to report
//
// We don't do any processing here, just post a message to our
// main UI thread to handle this. In general, an MTA application should
// do as little as possible on the thread that the callback
// is fired in
//
HRESULT STDMETHODCALLTYPE CTAPIEventNotification::Event(TAPI_EVENT TapiEvent, IDispatch* pEvent)
{
// addref the event so it doesn't go away
pEvent->AddRef();
// post a message to myself
PostMessage(AfxGetMainWnd()->m_hWnd, WM_TAPI_EVENT, (WPARAM)TapiEvent, (LPARAM)pEvent);
return S_OK;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -