Go to the source code of this file.
◆ IntClientShutdown()
Definition at line 22 of file shutdown.c.
25{
31
33 lParams =
lParam & (ENDSESSION_LOGOFF | ENDSESSION_CRITICAL | ENDSESSION_CLOSEAPP);
34
35
37
39 {
41 {
43
45 continue;
46
48 {
50 {
52 break;
53 }
54 }
55 else
56 {
58 if (KillTimers)
59 {
61 }
63 }
64 }
67 return lResult;
68 }
69
70
72 {
74 {
76 }
77 }
78 else
79 {
81 if (KillTimers)
82 {
84 }
86 }
87
88 return lResult;
89}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define UserHMGetHandle(obj)
#define ExFreePoolWithTag(_P, _T)
#define MCSR_GOODFORSHUTDOWN
#define MCS_QUERYENDSESSION
#define MCSR_SHUTDOWNFINISHED
#define MCSR_DONOTSHUTDOWN
PWND FASTCALL UserGetWindowObject(HWND hWnd)
_Must_inspect_result_ _In_ WDFCMRESLIST List
LRESULT FASTCALL co_IntSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
BOOL FASTCALL DestroyTimersForWindow(PTHREADINFO pti, PWND Window)
HWND *FASTCALL IntWinListChildren(PWND Window)
#define WM_QUERYENDSESSION
Referenced by IntDefWindowProc().
◆ UserEndShutdown()
Definition at line 290 of file shutdown.c.
292{
296
297 TRACE(
"UserEndShutdown called\n");
298
299
300
301
302
303
304
307 {
308 ERR(
"UserEndShutdown: GetProcessLuid failed\n");
310 }
311
312
314
316 {
317
319 }
320 else
321 {
322
324
325 }
326
327 TRACE(
"UserEndShutdown: Notify Winlogon for end of shutdown\n");
329
330
332}
#define NT_SUCCESS(StatCode)
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
#define EWX_SHUTDOWN_CANCELED
NTSTATUS GetProcessLuid(IN PETHREAD Thread OPTIONAL, IN PEPROCESS Process OPTIONAL, OUT PLUID Luid)
static ULONG gdwShutdownFlags
BOOL NotifyLogon(IN HWND hWndSta, IN PLUID CallerLuid, IN ULONG Flags, IN NTSTATUS ShutdownStatus)
_Must_inspect_result_ _In_ ULONG Flags
Referenced by NtUserSetInformationThread().
◆ UserInitiateShutdown()
Definition at line 166 of file shutdown.c.
168{
174 {
177 };
178
180
181 TRACE(
"UserInitiateShutdown\n");
182
183
186 {
187 ERR(
"UserInitiateShutdown: GetProcessLuid failed\n");
189 }
190
191
192
193
194
195
198 else
199 Flags &= ~EWX_CALLER_SYSTEM;
200
202
203
206 {
207 ERR(
"UserInitiateShutdown: Failed to get win32 thread!\n");
209 }
210
211
213 {
214
215
216
217
218 Flags &= ~EWX_CALLER_WINLOGON;
219
221
222
224 {
225 ERR(
"UserInitiateShutdown: Process is not attached to a desktop\n");
227 }
228
229
231 {
232 ERR(
"UserInitiateShutdown: Caller doesn't have the rights to shutdown\n");
234 }
235
236
237
238
239
240
242 {
243
245 {
246 ERR(
"UserInitiateShutdown: Caller doesn't have the rights to shutdown\n");
248 }
249 }
250 else
251 {
252
253
254
255
257 {
258 ERR(
"UserInitiateShutdown: Caller doesn't have the rights to logoff\n");
260 }
261 }
262 }
263
264
266 {
267
268 TRACE(
"UserInitiateShutdown: Notify Winlogon for shutdown\n");
271 }
272
273
274 TRACE(
"UserInitiateShutdown: Winlogon is doing a shutdown\n");
275
276
277
278
279
282
283
285
287}
#define STATUS_PRIVILEGE_NOT_HELD
PEPROCESS __stdcall PsGetThreadProcess(_In_ PETHREAD Thread)
#define SE_SHUTDOWN_PRIVILEGE
NTSYSAPI BOOLEAN NTAPI RtlAreAllAccessesGranted(ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess)
PVOID NTAPI PsGetProcessWin32Process(PEPROCESS Process)
HANDLE NTAPI PsGetThreadProcessId(IN PETHREAD Thread)
#define STATUS_INVALID_HANDLE
struct _WINSTATION_OBJECT * prpwinsta
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_ACCESS_DENIED
#define EWX_CALLER_SYSTEM
#define EWX_CALLER_WINLOGON
BOOLEAN HasPrivilege(IN PPRIVILEGE_SET Privilege)
#define WINSTA_EXITWINDOWS
#define RtlEqualLuid(Luid1, Luid2)
#define PRIVILEGE_SET_ALL_NECESSARY
Referenced by NtUserSetInformationThread().