tapieventnotification.cpp
来自「基于Tapi 3.0的软电话源代码」· C++ 代码 · 共 45 行
CPP
45 行
//-----------------------------------------------------------------------
// 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 + =
减小字号Ctrl + -
显示快捷键?