NtSetInformationProcess(NtCurrentProcess(),
ProcessBasePriority,
&BasePriority,
- sizeof(KPRIORITY));
+ sizeof(BasePriority));
}
/*++
NTAPI
CsrSetToShutdownPriority(VOID)
{
- KPRIORITY SetBasePriority = (8 + 1) + 6;
+ KPRIORITY BasePriority = (8 + 1) + 6;
BOOLEAN Old;
/* Get the shutdown privilege */
/* Set the Priority */
NtSetInformationProcess(NtCurrentProcess(),
ProcessBasePriority,
- &SetBasePriority,
- sizeof(KPRIORITY));
+ &BasePriority,
+ sizeof(BasePriority));
}
}
}
}
- /* Set the Exception port for us */
+ /* Set the Exception Port for us */
Status = NtSetInformationProcess(hProcess,
ProcessExceptionPort,
&CsrApiPort,
- sizeof(HANDLE));
+ sizeof(CsrApiPort));
if (!NT_SUCCESS(Status))
{
/* Failed */
Status = NtSetInformationProcess(hProcess,
ProcessDebugPort,
&CsrApiPort,
- sizeof(HANDLE));
+ sizeof(CsrApiPort));
ASSERT(NT_SUCCESS(Status));
if (!NT_SUCCESS(Status))
{
/* Get the Thread Create Time */
Status = NtQueryInformationThread(hThread,
ThreadTimes,
- (PVOID)&KernelTimes,
+ &KernelTimes,
sizeof(KernelTimes),
NULL);
if (!NT_SUCCESS(Status))
if (!NT_SUCCESS(Status))
{
/* Failure */
+#ifdef CSR_DBG
DPRINT1("CSRSS: Can't impersonate client thread - Status = %lx\n", Status);
// if (Status != STATUS_BAD_IMPERSONATION_LEVEL) DbgBreakPoint();
+#endif
return FALSE;
}
Status = NtSetInformationThread(NtCurrentThread(),
ThreadImpersonationToken,
&ImpersonationToken,
- sizeof(HANDLE));
+ sizeof(ImpersonationToken));
/* Return TRUE or FALSE */
return NT_SUCCESS(Status);
NTAPI
CsrSetBackgroundPriority(IN PCSR_PROCESS CsrProcess)
{
- PROCESS_PRIORITY_CLASS PriorityClass;
+ PROCESS_FOREGROUND_BACKGROUND ProcessPriority;
/* Set the Foreground bit off */
- PriorityClass.Foreground = FALSE;
+ ProcessPriority.Foreground = FALSE;
- /* Set the new Priority */
+ /* Set the new priority */
NtSetInformationProcess(CsrProcess->ProcessHandle,
- ProcessPriorityClass,
- &PriorityClass,
- sizeof(PriorityClass));
+ ProcessForegroundInformation,
+ &ProcessPriority,
+ sizeof(ProcessPriority));
}
/*++
NTAPI
CsrSetForegroundPriority(IN PCSR_PROCESS CsrProcess)
{
- PROCESS_PRIORITY_CLASS PriorityClass;
+ PROCESS_FOREGROUND_BACKGROUND ProcessPriority;
/* Set the Foreground bit on */
- PriorityClass.Foreground = TRUE;
+ ProcessPriority.Foreground = TRUE;
- /* Set the new Priority */
+ /* Set the new priority */
NtSetInformationProcess(CsrProcess->ProcessHandle,
- ProcessPriorityClass,
- &PriorityClass,
- sizeof(PriorityClass));
+ ProcessForegroundInformation,
+ &ProcessPriority,
+ sizeof(ProcessPriority));
}
/*++
}
else if (Result == CsrShutdownCancelled)
{
+#ifdef CSR_DBG
/* Check if this was a forced shutdown */
if (Flags & EWX_FORCE)
{
CsrProcess->ClientId.UniqueProcess, i);
DbgBreakPoint();
}
+#endif
/* Shutdown was cancelled, unlock and exit */
CsrReleaseProcessLock();
}
/* We've reached the final loop here, so dereference */
- if (i == CSR_SERVER_DLL_MAX) CsrLockedDereferenceProcess(CsrProcess);
+ if (i == CSR_SERVER_DLL_MAX)
+ CsrLockedDereferenceProcess(CsrProcess);
}
/* Success path */