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.

72 lines
1.7 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2001.
  5. //
  6. // File: Snpobj.cpp
  7. //
  8. // Contents: WiF Policy Snapin
  9. //
  10. //
  11. // History: TaroonM
  12. // 10/30/01
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "stdafx.h"
  16. #ifdef _DEBUG
  17. #define new DEBUG_NEW
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21. ///////////////////////////////////////////////////////////////////////////////
  22. // Construction/destruction
  23. CSnapObject::CSnapObject ()
  24. {
  25. // init members
  26. m_pComponentDataImpl = NULL;
  27. m_pComponentImpl = NULL;
  28. m_bChanged = FALSE;
  29. m_hConsole = NULL;
  30. }
  31. CSnapObject::~CSnapObject()
  32. {
  33. // free off the notify handle
  34. if (m_hConsole != NULL)
  35. {
  36. // Note - This needs to be called only once.
  37. // If called more than once, it will gracefully return an error.
  38. // MMCFreeNotifyHandle(m_hConsole);
  39. m_hConsole = NULL;
  40. }
  41. };
  42. void CSnapObject::Initialize (CComponentDataImpl* pComponentDataImpl,CComponentImpl* pComponentImpl, BOOL bTemporaryDSObject)
  43. {
  44. ASSERT( NULL == pComponentImpl ); // is this ever valid? if not remove it
  45. m_pComponentDataImpl = pComponentDataImpl;
  46. m_pComponentImpl = pComponentImpl;
  47. };
  48. /////////////////////////////////////////////////////////////////////////////
  49. // Protected members
  50. int CSnapObject::PopWiz97Page ()
  51. {
  52. int i;
  53. i = m_stackWiz97Pages.top();
  54. m_stackWiz97Pages.pop();
  55. return i;
  56. }
  57. void CSnapObject::PushWiz97Page (int nIDD)
  58. {
  59. m_stackWiz97Pages.push(nIDD);
  60. }