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.

196 lines
3.5 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1996 - 1999
  3. Module Name:
  4. ResMgrSt
  5. Abstract:
  6. This file contains definititions of threads
  7. used by scstatus.exe to monitor the status of
  8. the Smart Card Resource Manager and report changes.
  9. Author:
  10. Amanda Matlosz 10/28/98
  11. Environment:
  12. Win32, C++ w/Exceptions, MFC
  13. Revision History:
  14. Notes:
  15. --*/
  16. #if !defined(_RES_MGR_STATUS)
  17. #define _RES_MGR_STATUS
  18. #if _MSC_VER >= 1000
  19. #pragma once
  20. #endif // _MSC_VER >= 1000
  21. /////////////////////////////////////////////////////////////////////////////
  22. //
  23. // Includes
  24. //
  25. #include "cmnstat.h"
  26. ///////////////////////////////////////////////////////////////////////////
  27. //
  28. // CResMgrStatusThrd - is Calais running or stopped?
  29. //
  30. class CResMgrStatusThrd: public CWinThread
  31. {
  32. // Declare class dynamically creatable
  33. DECLARE_DYNCREATE(CResMgrStatusThrd)
  34. public:
  35. // Construction / Destruction
  36. CResMgrStatusThrd()
  37. {
  38. m_bAutoDelete = FALSE;
  39. m_hCallbackWnd = NULL;
  40. m_hKillThrd = NULL;
  41. }
  42. ~CResMgrStatusThrd() {}
  43. // Implementation
  44. public:
  45. virtual BOOL InitInstance();
  46. // Member vars
  47. public:
  48. HWND m_hCallbackWnd;
  49. HANDLE m_hKillThrd;
  50. };
  51. ///////////////////////////////////////////////////////////////////////////
  52. //
  53. // CNewReaderThrd - has a new reader been made available to Calais?
  54. //
  55. class CNewReaderThrd: public CWinThread
  56. {
  57. // Declare class dynamically creatable
  58. DECLARE_DYNCREATE(CNewReaderThrd)
  59. public:
  60. // Construction / Destruction
  61. CNewReaderThrd()
  62. {
  63. m_bAutoDelete = FALSE;
  64. m_hCallbackWnd = NULL;
  65. m_hKillThrd = NULL;
  66. }
  67. ~CNewReaderThrd() {}
  68. // Implementation
  69. public:
  70. virtual BOOL InitInstance();
  71. // Member vars
  72. public:
  73. HWND m_hCallbackWnd;
  74. HANDLE m_hKillThrd;
  75. };
  76. ///////////////////////////////////////////////////////////////////////////
  77. //
  78. // CRemovalOptionsThrd - has user changed removal options? (via lock/unlock)
  79. //
  80. class CRemovalOptionsThrd: public CWinThread
  81. {
  82. // Declare class dynamically creatable
  83. DECLARE_DYNCREATE(CRemovalOptionsThrd)
  84. public:
  85. // Construction / Destruction
  86. CRemovalOptionsThrd()
  87. {
  88. m_bAutoDelete = FALSE;
  89. m_hCallbackWnd = NULL;
  90. m_hKillThrd = NULL;
  91. }
  92. ~CRemovalOptionsThrd() {}
  93. // Implementation
  94. public:
  95. virtual BOOL InitInstance();
  96. // Member vars
  97. public:
  98. HWND m_hCallbackWnd;
  99. HANDLE m_hKillThrd;
  100. };
  101. ///////////////////////////////////////////////////////////////////////////
  102. //
  103. // CCardStatusThrd - has a card been idle for X seconds?
  104. //
  105. class CCardStatusThrd: public CWinThread
  106. {
  107. // Declare class dynamically creatable
  108. DECLARE_DYNCREATE(CCardStatusThrd)
  109. public:
  110. // Construction / Destruction
  111. CCardStatusThrd()
  112. {
  113. m_bAutoDelete = FALSE;
  114. m_hCallbackWnd = NULL;
  115. m_hKillThrd = NULL;
  116. m_paIdleList = NULL;
  117. m_hCtx = NULL;
  118. m_pstrLogonReader = NULL;
  119. }
  120. ~CCardStatusThrd() { }
  121. // Implementation
  122. public:
  123. virtual BOOL InitInstance();
  124. void CopyIdleList(CStringArray* paStr);
  125. void Close()
  126. {
  127. if (m_hCtx != NULL)
  128. {
  129. SCardCancel(m_hCtx);
  130. }
  131. // supress messages
  132. m_hCallbackWnd = NULL;
  133. }
  134. // Member vars
  135. public:
  136. HWND m_hCallbackWnd;
  137. HANDLE m_hKillThrd;
  138. SCARDCONTEXT m_hCtx;
  139. CStringArray* m_paIdleList;
  140. CCriticalSection m_csLock;
  141. CString* m_pstrLogonReader;
  142. };
  143. //{{AFX_INSERT_LOCATION}}
  144. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  145. #endif // _RES_MGR_STATUS