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.

48 lines
994 B

  1. // ActionPolicy.cpp: implementation of the CActionPolicy class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "snapin.h"
  6. #include "ActionPolicy.h"
  7. #ifdef _DEBUG
  8. #undef THIS_FILE
  9. static char THIS_FILE[]=__FILE__;
  10. #define new DEBUG_NEW
  11. #endif
  12. IMPLEMENT_DYNCREATE(CActionPolicy,CHMObject)
  13. //////////////////////////////////////////////////////////////////////
  14. // Construction/Destruction
  15. //////////////////////////////////////////////////////////////////////
  16. CActionPolicy::CActionPolicy()
  17. {
  18. m_sName.LoadString(IDS_STRING_ACTIONS);
  19. m_pActionListener = NULL;
  20. // create the GUID
  21. GUID ChildGuid;
  22. CoCreateGuid(&ChildGuid);
  23. OLECHAR szGuid[GUID_CCH];
  24. ::StringFromGUID2(ChildGuid, szGuid, GUID_CCH);
  25. CString sGuid = OLE2CT(szGuid);
  26. SetGuid(sGuid);
  27. }
  28. CActionPolicy::~CActionPolicy()
  29. {
  30. if( m_pActionListener )
  31. {
  32. delete m_pActionListener;
  33. m_pActionListener = NULL;
  34. }
  35. // TODO: Flush Statistics
  36. // TODO: Flush all events
  37. }