mirror of
https://github.com/reactos/reactos.git
synced 2025-08-08 02:33:03 +00:00
[WINSRV] usersrv: remove wrong dead code and fix indentation
This commit is contained in:
parent
4bef6f5913
commit
cc710885d0
1 changed files with 89 additions and 124 deletions
|
@ -394,31 +394,6 @@ IsConsoleMode(VOID)
|
||||||
return (BOOLEAN)NtUserCallNoParam(NOPARAM_ROUTINE_ISCONSOLEMODE);
|
return (BOOLEAN)NtUserCallNoParam(NOPARAM_ROUTINE_ISCONSOLEMODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* TODO: Find an other way to do it. */
|
|
||||||
#if 0
|
|
||||||
VOID FASTCALL
|
|
||||||
ConioConsoleCtrlEventTimeout(DWORD Event, PCSR_PROCESS ProcessData, DWORD Timeout)
|
|
||||||
{
|
|
||||||
HANDLE Thread;
|
|
||||||
|
|
||||||
DPRINT("ConioConsoleCtrlEvent Parent ProcessId = %x\n", ProcessData->ClientId.UniqueProcess);
|
|
||||||
|
|
||||||
if (ProcessData->CtrlDispatcher)
|
|
||||||
{
|
|
||||||
Thread = CreateRemoteThread(ProcessData->ProcessHandle, NULL, 0,
|
|
||||||
(LPTHREAD_START_ROUTINE) ProcessData->CtrlDispatcher,
|
|
||||||
UlongToPtr(Event), 0, NULL);
|
|
||||||
if (Thread == NULL)
|
|
||||||
{
|
|
||||||
DPRINT1("Failed thread creation (Error: 0x%x)\n", GetLastError());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
WaitForSingleObject(Thread, Timeout);
|
|
||||||
CloseHandle(Thread);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/************************************************/
|
/************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -448,8 +423,10 @@ ThreadShutdownNotify(IN PCSR_THREAD CsrThread,
|
||||||
}
|
}
|
||||||
if (TopWnd != tmpWnd) MY_DPRINT("(TopWnd = %x) != (tmpWnd = %x)\n", TopWnd, tmpWnd);
|
if (TopWnd != tmpWnd) MY_DPRINT("(TopWnd = %x) != (tmpWnd = %x)\n", TopWnd, tmpWnd);
|
||||||
}
|
}
|
||||||
if (TopWnd == NULL)
|
else
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Context->wParam = Flags2;
|
Context->wParam = Flags2;
|
||||||
Context->lParam = (0 != (Flags & EWX_CALLER_WINLOGON_LOGOFF) ?
|
Context->lParam = (0 != (Flags & EWX_CALLER_WINLOGON_LOGOFF) ?
|
||||||
|
@ -511,26 +488,15 @@ NotifyProcessForShutdown(PCSR_PROCESS CsrProcess,
|
||||||
UINT Flags)
|
UINT Flags)
|
||||||
{
|
{
|
||||||
DWORD QueryResult = QUERY_RESULT_CONTINUE;
|
DWORD QueryResult = QUERY_RESULT_CONTINUE;
|
||||||
|
PCSR_PROCESS Process;
|
||||||
|
PCSR_THREAD Thread;
|
||||||
|
PLIST_ENTRY NextEntry;
|
||||||
|
NOTIFY_CONTEXT Context;
|
||||||
|
|
||||||
/* In case we make a forced shutdown, just kill the process */
|
/* In case we make a forced shutdown, just kill the process */
|
||||||
if (Flags & EWX_FORCE)
|
if (Flags & EWX_FORCE)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
// TODO: Find an other way whether or not the process has a console.
|
|
||||||
#if 0
|
|
||||||
if (CsrProcess->Console)
|
|
||||||
{
|
|
||||||
ConioConsoleCtrlEventTimeout(CTRL_LOGOFF_EVENT, CsrProcess,
|
|
||||||
ShutdownSettings->WaitToKillAppTimeout);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
PCSR_PROCESS Process;
|
|
||||||
PCSR_THREAD Thread;
|
|
||||||
PLIST_ENTRY NextEntry;
|
|
||||||
|
|
||||||
NOTIFY_CONTEXT Context;
|
|
||||||
Context.ShutdownSettings = ShutdownSettings;
|
Context.ShutdownSettings = ShutdownSettings;
|
||||||
Context.QueryResult = QUERY_RESULT_CONTINUE; // We continue shutdown by default.
|
Context.QueryResult = QUERY_RESULT_CONTINUE; // We continue shutdown by default.
|
||||||
|
|
||||||
|
@ -620,7 +586,6 @@ Quit:
|
||||||
CloseHandle(Context.UIThread);
|
CloseHandle(Context.UIThread);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
/* Kill the process unless we abort shutdown */
|
/* Kill the process unless we abort shutdown */
|
||||||
return (QueryResult != QUERY_RESULT_ABORT);
|
return (QueryResult != QUERY_RESULT_ABORT);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue