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.

205 lines
2.4 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1997 - 1999
  3. Module Name:
  4. senslogn.hxx
  5. Abstract:
  6. Header file for SENS Event notify DLL for Winlogon events.
  7. Author:
  8. Gopal Parupudi <GopalP>
  9. [Notes:]
  10. optional-notes
  11. Revision History:
  12. GopalP 12/7/1997 Start.
  13. --*/
  14. #ifndef __SENSLOGN_HXX__
  15. #define __SENSLOGN_HXX__
  16. extern "C" {
  17. #ifdef DETAIL_DEBUG
  18. PCHAR
  19. UnicodeToAnsi(
  20. PWSTR in,
  21. PCHAR out
  22. );
  23. #endif // DETAIL_DEBUG
  24. DWORD WINAPI
  25. SensLogonEvent(
  26. LPVOID lpvParam
  27. );
  28. DWORD WINAPI
  29. SensLogoffEvent(
  30. LPVOID lpvParam
  31. );
  32. DWORD WINAPI
  33. SensStartupEvent(
  34. LPVOID lpvParam
  35. );
  36. DWORD WINAPI
  37. SensStartShellEvent(
  38. LPVOID lpvParam
  39. );
  40. DWORD WINAPI
  41. SensPostShellEvent(
  42. LPVOID lpvParam
  43. );
  44. DWORD WINAPI
  45. SensDisconnectEvent(
  46. LPVOID lpvParam
  47. );
  48. DWORD WINAPI
  49. SensReconnectEvent(
  50. LPVOID lpvParam
  51. );
  52. DWORD WINAPI
  53. SensShutdownEvent(
  54. LPVOID lpvParam
  55. );
  56. DWORD WINAPI
  57. SensLockEvent(
  58. LPVOID lpvParam
  59. );
  60. DWORD WINAPI
  61. SensUnlockEvent(
  62. LPVOID lpvParam
  63. );
  64. DWORD WINAPI
  65. SensStartScreenSaverEvent(
  66. LPVOID lpvParam
  67. );
  68. DWORD WINAPI
  69. SensStopScreenSaverEvent(
  70. LPVOID lpvParam
  71. );
  72. DWORD WINAPI
  73. SensWaitToStartRoutine(
  74. LPVOID lpvParam
  75. );
  76. HRESULT
  77. SensNotifyEventSystem(
  78. DWORD dwEvent,
  79. LPVOID lpvParam
  80. );
  81. DWORD WINAPI
  82. StartSensIfNecessary(
  83. void
  84. );
  85. BOOLEAN
  86. InitializeNotifyInterface(
  87. void
  88. );
  89. RPC_STATUS RPC_ENTRY
  90. AllowLocalSystem(
  91. IN RPC_IF_HANDLE InterfaceUuid,
  92. IN void *Context
  93. );
  94. void
  95. OnUserLogon(
  96. WLX_NOTIFICATION_INFO * User
  97. );
  98. void
  99. OnUserLogoff(
  100. WLX_NOTIFICATION_INFO * User
  101. );
  102. } // extern "C"
  103. //
  104. // Types
  105. //
  106. struct USER_INFO_NODE
  107. {
  108. LIST_ENTRY Links;
  109. BOOLEAN fActive;
  110. WLX_NOTIFICATION_INFO Info;
  111. };
  112. class USER_LOGON_TABLE
  113. {
  114. public:
  115. USER_LOGON_TABLE(
  116. DWORD * pStatus
  117. ) : Mutex(pStatus)
  118. {
  119. List.Flink = &List;
  120. List.Blink = &List;
  121. }
  122. BOOL
  123. Add(
  124. WLX_NOTIFICATION_INFO * User
  125. );
  126. BOOL
  127. Remove(
  128. WLX_NOTIFICATION_INFO * User
  129. );
  130. HANDLE
  131. CurrentUserTokenFromWindowStation(
  132. wchar_t WindowStation[]
  133. );
  134. USER_INFO_NODE *
  135. FromWindowStation(
  136. wchar_t WindowStation[]
  137. );
  138. private:
  139. USER_INFO_NODE *
  140. FindInactiveEntry();
  141. LIST_ENTRY List;
  142. MUTEX Mutex;
  143. };
  144. #endif // __SENSLOGN_HXX__