⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eventcomimpl.h

📁 C++Builder高级应用开发指南随书源码
💻 H
字号:
// EVENTCOMIMPL.H : Declaration of the TEventComImpl

#ifndef EventComImplH
#define EventComImplH

#include "ComDll_TLB.H"


/////////////////////////////////////////////////////////////////////////////
// TEventComImpl     Implements IEventCom, default interface of EventCom
//                  and IEventComEvents, the default source interface
// ThreadingModel : Apartment
// Dual Interface : FALSE
// Event Support  : TRUE
// Default ProgID : ComDll.EventCom
// Description    : 
/////////////////////////////////////////////////////////////////////////////
class ATL_NO_VTABLE TEventComImpl : 
  public CComObjectRootEx<CComSingleThreadModel>,
  public CComCoClass<TEventComImpl, &CLSID_EventCom>,
  public IConnectionPointContainerImpl<TEventComImpl>,
  public TEvents_EventCom<TEventComImpl>, 
  public IEventCom
{
public:
  TEventComImpl()
  {
  }

  // Data used when registering Object 
  //
  DECLARE_THREADING_MODEL(otApartment);
  DECLARE_PROGID("ComDll.EventCom");
  DECLARE_DESCRIPTION("");

  // Function invoked to (un)register object
  //
  static HRESULT WINAPI UpdateRegistry(BOOL bRegister)
  {
    TTypedComServerRegistrarT<TEventComImpl> 
    regObj(GetObjectCLSID(), GetProgID(), GetDescription());
    return regObj.UpdateRegistry(bRegister);
  }


BEGIN_COM_MAP(TEventComImpl)
  COM_INTERFACE_ENTRY(IEventCom)
  COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
END_COM_MAP()

BEGIN_CONNECTION_POINT_MAP(TEventComImpl)
  CONNECTION_POINT_ENTRY(DIID_IEventComEvents)
END_CONNECTION_POINT_MAP()

// IEventCom
public:
 
  STDMETHOD(SetNum(long NumValue));
};

#endif //EventComImplH

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -