Old fashion design for PC-104
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.

55 lines
1.4 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: TaskSwitch.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of TaskSwitch.cpp
  13. //----------------------------------------------------------------------------
  14. // TaskSwitchLock.cpp: implementation of the CTaskSwitch class.
  15. //
  16. //////////////////////////////////////////////////////////////////////
  17. #include "stdafx.h"
  18. #include "chicago.h"
  19. #include "TaskSwitch.h"
  20. #include "..\..\LgLib\Version.h"
  21. #ifdef _DEBUG
  22. #undef THIS_FILE
  23. static char THIS_FILE[]=__FILE__;
  24. #define new DEBUG_NEW
  25. #endif
  26. CTaskSwitch::CTaskSwitch()
  27. {
  28. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CTaskSwitch::CTaskSwitch") );
  29. }
  30. CTaskSwitch::~CTaskSwitch()
  31. {
  32. Unlock();
  33. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CTaskSwitch::~CTaskSwitch") );
  34. }
  35. void CTaskSwitch::Lock()
  36. {
  37. #ifndef _DEBUG
  38. if( ::GetVersion() & 0x80000000 )
  39. ::SystemParametersInfo ( SPI_SCREENSAVERRUNNING, 1, NULL, 0 );
  40. #endif
  41. }
  42. void CTaskSwitch::Unlock()
  43. {
  44. #ifndef _DEBUG
  45. if( ::GetVersion() & 0x80000000 )
  46. ::SystemParametersInfo ( SPI_SCREENSAVERRUNNING, 0, NULL, 0 );
  47. #endif
  48. }