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.

192 lines
2.5 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. DWORD WINAPI
  18. SensLogonEvent(
  19. LPVOID lpvParam
  20. );
  21. DWORD WINAPI
  22. SensLogoffEvent(
  23. LPVOID lpvParam
  24. );
  25. DWORD WINAPI
  26. SensStartupEvent(
  27. LPVOID lpvParam
  28. );
  29. DWORD WINAPI
  30. SensStartShellEvent(
  31. LPVOID lpvParam
  32. );
  33. DWORD WINAPI
  34. SensPostShellEvent(
  35. LPVOID lpvParam
  36. );
  37. DWORD WINAPI
  38. SensDisconnectEvent(
  39. LPVOID lpvParam
  40. );
  41. DWORD WINAPI
  42. SensReconnectEvent(
  43. LPVOID lpvParam
  44. );
  45. DWORD WINAPI
  46. SensShutdownEvent(
  47. LPVOID lpvParam
  48. );
  49. DWORD WINAPI
  50. SensLockEvent(
  51. LPVOID lpvParam
  52. );
  53. DWORD WINAPI
  54. SensUnlockEvent(
  55. LPVOID lpvParam
  56. );
  57. DWORD WINAPI
  58. SensStartScreenSaverEvent(
  59. LPVOID lpvParam
  60. );
  61. DWORD WINAPI
  62. SensStopScreenSaverEvent(
  63. LPVOID lpvParam
  64. );
  65. DWORD WINAPI
  66. SensWaitToStartRoutine(
  67. LPVOID lpvParam
  68. );
  69. HRESULT
  70. SensNotifyEventSystem(
  71. DWORD dwEvent,
  72. LPVOID lpvParam
  73. );
  74. DWORD WINAPI
  75. StartSensIfNecessary(
  76. void
  77. );
  78. BOOLEAN
  79. InitializeNotifyInterface(
  80. void
  81. );
  82. RPC_STATUS RPC_ENTRY
  83. AllowLocalSystem(
  84. IN RPC_IF_HANDLE InterfaceUuid,
  85. IN void *Context
  86. );
  87. void
  88. OnUserLogon(
  89. WLX_NOTIFICATION_INFO * User
  90. );
  91. void
  92. OnUserLogoff(
  93. WLX_NOTIFICATION_INFO * User
  94. );
  95. } // extern "C"
  96. //
  97. // Types
  98. //
  99. struct USER_INFO_NODE
  100. {
  101. LIST_ENTRY Links;
  102. BOOLEAN fActive;
  103. WLX_NOTIFICATION_INFO Info;
  104. };
  105. class USER_LOGON_TABLE
  106. {
  107. public:
  108. USER_LOGON_TABLE(
  109. DWORD * pStatus
  110. ) : Mutex(pStatus)
  111. {
  112. List.Flink = &List;
  113. List.Blink = &List;
  114. }
  115. BOOL
  116. Add(
  117. WLX_NOTIFICATION_INFO * User
  118. );
  119. BOOL
  120. Remove(
  121. WLX_NOTIFICATION_INFO * User
  122. );
  123. HANDLE
  124. CurrentUserTokenFromWindowStation(
  125. wchar_t WindowStation[]
  126. );
  127. USER_INFO_NODE *
  128. FromWindowStation(
  129. wchar_t WindowStation[]
  130. );
  131. private:
  132. USER_INFO_NODE *
  133. FindInactiveEntry();
  134. LIST_ENTRY List;
  135. MUTEX Mutex;
  136. };
  137. #endif // __SENSLOGN_HXX__