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.

63 lines
1003 B

  1. /*++
  2. Copyright (C) 1997-2001 Microsoft Corporation
  3. Module Name:
  4. REGEVENT.H
  5. Abstract:
  6. Declares the CRegEvent class
  7. History:
  8. a-davj 1-July-97 Created.
  9. --*/
  10. #ifndef _Regevent_H_
  11. #define _Regevent_H_
  12. #include <wbemcomn.h>
  13. #include <node.h>
  14. class CRegEvent
  15. {
  16. public:
  17. CRegEvent(IWbemClassObject * pObj, IWbemServices * pWbem);
  18. ~CRegEvent();
  19. BOOL IsMatch(WCHAR * pwcID){return !_wcsicmp(pwcID, m_wcGuid);};
  20. void TimerCheck();
  21. DWORD CalcHive(HKEY hSubKey,DWORD & dwNewCheckSum);
  22. private:
  23. IWbemServices * m_pWbem;
  24. DWORD m_dwCheckSum;
  25. CNode * m_pLastHiveImage;
  26. WCHAR m_wcGuid[40];
  27. long m_lTimeIntSec;
  28. CEventRegistration m_TimerEvent;
  29. TString m_sRegPath;
  30. TString m_sRegValue;
  31. BOOL m_bSaveHiveImage;
  32. };
  33. class CRegEventSet
  34. {
  35. public:
  36. CRegEventSet();
  37. SCODE Initialize(IWbemServices * pWbem);
  38. ~CRegEventSet();
  39. void FindEvent(WCHAR * pwcID);
  40. private:
  41. IWbemServices * m_pWbem;
  42. CFlexArray m_Set;
  43. CEventRegistration m_Event;
  44. };
  45. extern CRegEventSet gSet;
  46. #endif