home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winbase / security / certsvr / exit / exit.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-04  |  1.6 KB  |  64 lines

  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.  
  12. #include "resource.h"       // main symbols
  13. #include <certexit.h>
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // certexit
  17.  
  18.  
  19. class CCertExit: 
  20.     public CComDualImpl<ICertExit, &IID_ICertExit, &LIBID_CERTEXITLib>, 
  21.     public ISupportErrorInfo,
  22.     public CComObjectRoot,
  23.     public CComCoClass<CCertExit, &CLSID_CCertExit>
  24. {
  25. public:
  26.     CCertExit() { m_strConfig = NULL; }
  27.     ~CCertExit();
  28.  
  29. BEGIN_COM_MAP(CCertExit)
  30.     COM_INTERFACE_ENTRY(IDispatch)
  31.     COM_INTERFACE_ENTRY(ICertExit)
  32.     COM_INTERFACE_ENTRY(ISupportErrorInfo)
  33. END_COM_MAP()
  34.  
  35. DECLARE_NOT_AGGREGATABLE(CCertExit) 
  36.  
  37. DECLARE_REGISTRY(
  38.     CCertExit,
  39.     wszCLASS_CERTEXIT TEXT(".1"),
  40.     wszCLASS_CERTEXIT,
  41.     IDS_CERTEXIT_DESC,
  42.     THREADFLAGS_BOTH)
  43.  
  44.     // ISupportsErrorInfo
  45.     STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  46.  
  47.     // ICertExit
  48. public:
  49.     STDMETHOD(Initialize)( 
  50.             /* [in] */ BSTR const strConfig,
  51.             /* [retval][out] */ LONG __RPC_FAR *pEventMask);
  52.  
  53.     STDMETHOD(Notify)(
  54.             /* [in] */ LONG Event,
  55.             /* [in] */ LONG Context);
  56.  
  57.     STDMETHOD(GetDescription)( 
  58.             /* [retval][out] */ BSTR *pstrDescription);
  59.  
  60. private:
  61.     // Member variables & private methods here:
  62.     BSTR m_strConfig;
  63. };
  64.