Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.7 KiB

  1. // comobj.h: Definition of the WmRgSrv class
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #ifndef _WAMREG_COMOBJ_H
  5. #define _WAMREG_COMOBJ_H
  6. //#if !defined(AFX_COMOBJ_H__29822ABB_F302_11D0_9953_00C04FD919C1__INCLUDED_)
  7. //#define AFX_COMOBJ_H__29822ABB_F302_11D0_9953_00C04FD919C1__INCLUDED_
  8. #if _MSC_VER >= 1000
  9. #pragma once
  10. #endif // _MSC_VER >= 1000
  11. #include "common.h"
  12. #include "resource.h" // main symbols
  13. #include "iadmw.h"
  14. #include "iiscnfg.h"
  15. #include "iadmext.h"
  16. /////////////////////////////////////////////////////////////////////////////
  17. // WmRgSrv
  18. class CWmRgSrv :
  19. public IADMEXT
  20. {
  21. public:
  22. CWmRgSrv();
  23. ~CWmRgSrv();
  24. //DECLARE_NOT_AGGREGATABLE(WmRgSrv)
  25. // Remove the comment from the line above if you don't want your object to
  26. // support aggregation.
  27. // IWmRgSrv
  28. public:
  29. STDMETHOD(QueryInterface)(REFIID riid, void ** ppv);
  30. STDMETHOD_(ULONG, AddRef)();
  31. STDMETHOD_(ULONG, Release)();
  32. STDMETHOD(Initialize)();
  33. STDMETHOD(EnumDcomCLSIDs)(/* [size_is][out] */CLSID *pclsidDcom, /* [in] */ DWORD dwEnumIndex);
  34. STDMETHOD(Terminate)();
  35. private:
  36. // Since wamreg has only one com object. No need to use static members.
  37. DWORD m_cSignature;
  38. LONG m_cRef;
  39. };
  40. class CWmRgSrvFactory:
  41. public IClassFactory
  42. {
  43. public:
  44. CWmRgSrvFactory();
  45. ~CWmRgSrvFactory();
  46. STDMETHOD(QueryInterface)(REFIID riid, void ** ppv);
  47. STDMETHOD_(ULONG, AddRef)();
  48. STDMETHOD_(ULONG, Release)();
  49. STDMETHOD(CreateInstance)(IUnknown * pUnknownOuter, REFIID riid, void ** ppv);
  50. STDMETHOD(LockServer)(BOOL bLock);
  51. CWmRgSrv *m_pWmRgServiceObj;
  52. private:
  53. ULONG m_cRef;
  54. };
  55. // Global data defines.
  56. extern CWmRgSrvFactory* g_pWmRgSrvFactory;
  57. extern DWORD g_dwRefCount;
  58. #endif // _WAMREG_COMOBJ_H