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.

53 lines
1.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1997.
  5. //
  6. // File: cisavtst.hxx
  7. //
  8. // Contents: A temporary thread to initiate saves of the CI data
  9. //
  10. // History: 3-18-97 srikants Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #pragma once
  14. class CiCat;
  15. class CCiSaveTest : INHERIT_UNWIND
  16. {
  17. INLINE_UNWIND( CCiSaveTest )
  18. public:
  19. CCiSaveTest( WCHAR const * pwszSaveDir,
  20. ICiPersistIncrFile * pICiPersistFile,
  21. CiCat & cicat );
  22. void InitiateShutdown()
  23. {
  24. _fAbort = TRUE;
  25. _evt.Set();
  26. }
  27. void WaitForDeath()
  28. {
  29. _thrSave.WaitForDeath();
  30. }
  31. private:
  32. void DoIt();
  33. static DWORD WINAPI SaveThread( void * self );
  34. CiCat & _cicat;
  35. BOOL _fAbort;
  36. CThread _thrSave;
  37. CEventSem _evt;
  38. ICiPersistIncrFile * _pICiPersistFile;
  39. XArray<WCHAR> _xwszSaveDir;
  40. };