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.

94 lines
2.2 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2001.
  5. //
  6. // File: Snpobj.h
  7. //
  8. // Contents: WiF Policy Snapin
  9. //
  10. //
  11. // History: TaroonM
  12. // 10/30/01
  13. //
  14. //----------------------------------------------------------------------------
  15. #ifndef _SNPOBJ_H
  16. #define _SNPOBJ_H
  17. #include <stack>
  18. using namespace std;
  19. typedef stack<int> STACK_INT;
  20. /*
  21. // cookies should be initialized to an invalid memory address
  22. #define UNINITIALIZED_COOKIE -1
  23. */
  24. class CComponentDataImpl;
  25. class CComponentImpl;
  26. ///////////////////////////////////////////////////////////////////////////////
  27. // class CSnapObject
  28. class CSnapObject
  29. {
  30. // general object functionality
  31. public:
  32. // construct/destruct
  33. CSnapObject ();
  34. virtual ~CSnapObject ();
  35. // these should not be being used!!
  36. virtual BOOL operator == (const CSnapObject& rhs) const { ASSERT (0); return FALSE;};
  37. virtual BOOL operator == (LONG_PTR pseudothis) const { ASSERT (0); return FALSE; };
  38. // initialization
  39. public:
  40. virtual void Initialize (CComponentDataImpl* pComponentDataImpl, CComponentImpl* pComponentImpl, BOOL bTemporaryDSObject);
  41. // Psuedo this ptr functionality
  42. public:
  43. virtual LONG_PTR thisPtr() {return reinterpret_cast<LONG_PTR>(this);};
  44. // helpers
  45. public:
  46. virtual void SetNotificationHandle (LONG_PTR hConsole)
  47. {
  48. if (m_hConsole)
  49. MMCFreeNotifyHandle(m_hConsole);
  50. m_hConsole = hConsole;
  51. };
  52. virtual void FreeNotifyHandle()
  53. {
  54. if (m_hConsole)
  55. MMCFreeNotifyHandle(m_hConsole);
  56. m_hConsole = NULL;
  57. }
  58. virtual LONG_PTR GetNotifyHandle()
  59. {
  60. return m_hConsole;
  61. }
  62. virtual int PopWiz97Page ();
  63. virtual void PushWiz97Page (int nIDD);
  64. // Attributes
  65. public:
  66. CComponentDataImpl* m_pComponentDataImpl;
  67. CComponentImpl* m_pComponentImpl; // TODO: not used(?), remove
  68. protected:
  69. protected:
  70. private:
  71. // Handle given to the snap-in by the console
  72. LONG_PTR m_hConsole;
  73. bool m_bChanged;
  74. STACK_INT m_stackWiz97Pages;
  75. };
  76. #endif