EXIT.H
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:2k
源码类别:

Windows编程

开发平台:

Visual C++

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996-1997
  5. //
  6. // File:        exit.cpp
  7. //
  8. // Contents:    CCertExit definition
  9. //
  10. //---------------------------------------------------------------------------
  11. #include "resource.h"       // main symbols
  12. #include <certexit.h>
  13. /////////////////////////////////////////////////////////////////////////////
  14. // certexit
  15. class CCertExit: 
  16.     public CComDualImpl<ICertExit, &IID_ICertExit, &LIBID_CERTEXITLib>, 
  17.     public ISupportErrorInfo,
  18.     public CComObjectRoot,
  19.     public CComCoClass<CCertExit, &CLSID_CCertExit>
  20. {
  21. public:
  22.     CCertExit() { m_strConfig = NULL; }
  23.     ~CCertExit();
  24. BEGIN_COM_MAP(CCertExit)
  25.     COM_INTERFACE_ENTRY(IDispatch)
  26.     COM_INTERFACE_ENTRY(ICertExit)
  27.     COM_INTERFACE_ENTRY(ISupportErrorInfo)
  28. END_COM_MAP()
  29. DECLARE_NOT_AGGREGATABLE(CCertExit) 
  30. DECLARE_REGISTRY(
  31.     CCertExit,
  32.     wszCLASS_CERTEXIT TEXT(".1"),
  33.     wszCLASS_CERTEXIT,
  34.     IDS_CERTEXIT_DESC,
  35.     THREADFLAGS_BOTH)
  36.     // ISupportsErrorInfo
  37.     STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  38.     // ICertExit
  39. public:
  40.     STDMETHOD(Initialize)( 
  41.             /* [in] */ BSTR const strConfig,
  42.             /* [retval][out] */ LONG __RPC_FAR *pEventMask);
  43.     STDMETHOD(Notify)(
  44.             /* [in] */ LONG Event,
  45.             /* [in] */ LONG Context);
  46.     STDMETHOD(GetDescription)( 
  47.             /* [retval][out] */ BSTR *pstrDescription);
  48. private:
  49.     // Member variables & private methods here:
  50.     BSTR m_strConfig;
  51. };