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.

49 lines
1.1 KiB

  1. //=======================================================================
  2. //
  3. // Copyright (c) 2001 Microsoft Corporation. All Rights Reserved.
  4. //
  5. // File: WrkThread.h
  6. //
  7. // Creator: PeterWi
  8. //
  9. // Purpose: Worker thread declarations.
  10. //
  11. //=======================================================================
  12. #pragma once
  13. #include "wuauengi.h"
  14. typedef enum
  15. {
  16. enWrkThreadInstall,
  17. enWrkThreadAutoInstall,
  18. enWrkThreadTerminate
  19. } enumWrkThreadDirective;
  20. //start another thread in client to install
  21. class CClientWrkThread
  22. {
  23. public:
  24. CClientWrkThread()
  25. : m_hEvtDirectiveStart(NULL),
  26. m_hEvtDirectiveDone(NULL),
  27. m_hWrkThread(NULL)
  28. {
  29. }
  30. ~CClientWrkThread();
  31. HRESULT m_Init(void);
  32. void m_Terminate(void);
  33. static DWORD WINAPI m_WorkerThread(void * lpParameter);
  34. static void PingStatus(PUID puid, PingStatusCode enStatusCode, HRESULT hrErr = 0);
  35. void m_DoDirective(enumWrkThreadDirective enDirective);
  36. void WaitUntilDone();
  37. private:
  38. HRESULT m_WaitForDirective(void);
  39. HANDLE m_hEvtDirectiveStart;
  40. HANDLE m_hEvtDirectiveDone;
  41. HANDLE m_hWrkThread;
  42. static HANDLE m_hEvtInstallDone;
  43. enumWrkThreadDirective m_enDirective;
  44. };