Leaked source code of windows server 2003
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.

92 lines
3.0 KiB

  1. /***************************************************************************\
  2. *
  3. * File: MsgClass.h
  4. *
  5. * Description:
  6. * MsgClass.h defines the "Message Class" object that is created for each
  7. * different message object type. Each object has a corresponding MsgClass
  8. * that provides information about that object type.
  9. *
  10. *
  11. * History:
  12. * 8/05/2000: JStall: Created
  13. *
  14. * Copyright (C) 2000 by Microsoft Corporation. All rights reserved.
  15. *
  16. \***************************************************************************/
  17. #if !defined(MSG__MsgClass_h__INCLUDED)
  18. #define MSG__MsgClass_h__INCLUDED
  19. #pragma once
  20. class MsgTable;
  21. class MsgObject;
  22. class MsgClass :
  23. public BaseObject,
  24. public ListNodeT<MsgClass>
  25. {
  26. // Construction
  27. public:
  28. inline MsgClass();
  29. ~MsgClass();
  30. static HRESULT Build(LPCWSTR pszClassName, MsgClass ** ppmcNew);
  31. virtual BOOL xwDeleteHandle();
  32. // BaseObject
  33. public:
  34. virtual HandleType GetHandleType() const { return htMsgClass; }
  35. virtual UINT GetHandleMask() const { return 0; }
  36. inline HCLASS GetHandle() const;
  37. // Operations
  38. public:
  39. inline ATOM GetName() const;
  40. inline const MsgTable *
  41. GetMsgTable() const;
  42. inline const MsgClass *
  43. GetSuper() const;
  44. inline BOOL IsGutsRegistered() const;
  45. inline BOOL IsInternal() const;
  46. inline void MarkInternal();
  47. HRESULT RegisterGuts(DUser::MessageClassGuts * pmcInfo);
  48. HRESULT RegisterStub(DUser::MessageClassStub * pmcInfo);
  49. HRESULT RegisterSuper(DUser::MessageClassSuper * pmcInfo);
  50. HRESULT xwBuildObject(MsgObject ** ppmoNew, DUser::Gadget::ConstructInfo * pciData) const;
  51. void xwTearDownObject(MsgObject * pmoNew) const;
  52. // Implementation
  53. protected:
  54. static HRESULT CALLBACK
  55. xwConstructCB(DUser::Gadget::ConstructCommand cmd, HCLASS hclCur, DUser::Gadget * pgad, void * pvData);
  56. HRESULT xwBuildUpObject(MsgObject * pmoNew, DUser::Gadget::ConstructInfo * pciData) const;
  57. HRESULT FillStub(DUser::MessageClassStub * pmcInfo) const;
  58. void FillSuper(DUser::MessageClassSuper * pmcInfo) const;
  59. // Data
  60. protected:
  61. ATOM m_atomName;
  62. LPCWSTR m_pszName;
  63. int m_nVersion;
  64. const MsgClass *
  65. m_pmcSuper;
  66. MsgTable * m_pmt;
  67. DUser::PromoteProc
  68. m_pfnPromote;
  69. DUser::DemoteProc
  70. m_pfnDemote;
  71. GArrayS<DUser::MessageClassStub *, ProcessHeap>
  72. m_arStubs;
  73. GArrayS<DUser::MessageClassSuper *, ProcessHeap>
  74. m_arSupers;
  75. BOOL m_fInternal:1;
  76. };
  77. #include "MsgClass.inl"
  78. #endif // MSG__MsgClass_h__INCLUDED