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.

50 lines
1.0 KiB

  1. /*
  2. * Thread methods, local storage
  3. */
  4. #ifndef DUI_CORE_THREAD_H_INCLUDED
  5. #define DUI_CORE_THREAD_H_INCLUDED
  6. #pragma once
  7. namespace DirectUI
  8. {
  9. /////////////////////////////////////////////////////////////////////////////
  10. // Synchronization lock
  11. class Lock
  12. {
  13. public:
  14. Lock() { InitializeCriticalSection(&_cs); }
  15. ~Lock() { DeleteCriticalSection(&_cs); }
  16. void Enter() { EnterCriticalSection(&_cs); }
  17. void Leave() { LeaveCriticalSection(&_cs); }
  18. private:
  19. CRITICAL_SECTION _cs;
  20. };
  21. extern Lock* g_plkParser;
  22. /////////////////////////////////////////////////////////////////////////////
  23. // Initialization
  24. HRESULT InitProcess();
  25. HRESULT UnInitProcess();
  26. HRESULT InitThread();
  27. HRESULT UnInitThread();
  28. // Control library class registration
  29. HRESULT RegisterAllControls();
  30. /////////////////////////////////////////////////////////////////////////////
  31. // Message pump
  32. void StartMessagePump();
  33. void StopMessagePump();
  34. } // namespace DirectUI
  35. #endif // DUI_CORE_THREAD_H_INCLUDED