Author: ion
Date: Wed Feb 15 20:29:08 2012
New Revision: 55617
URL:
http://svn.reactos.org/svn/reactos?rev=55617&view=rev
Log:
[CSRSRV/WIN32CSR]: No code change, but rename CSRSS_PROCESS_DATA to CSR_PROCESS and all
the right fields -- put ReactOS-specific fields at the end. Do all the right renames
needed for compilation. No functionality change.
Modified:
trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c
trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c
trunk/reactos/subsystems/win32/csrss/csrsrv/init.c
trunk/reactos/subsystems/win32/csrss/csrsrv/procsup.c
trunk/reactos/subsystems/win32/csrss/csrsrv/thredsup.c
trunk/reactos/subsystems/win32/csrss/include/api.h
trunk/reactos/subsystems/win32/csrss/include/csrplugin.h
trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c
trunk/reactos/subsystems/win32/csrss/win32csr/conio.h
trunk/reactos/subsystems/win32/csrss/win32csr/conoutput.c
trunk/reactos/subsystems/win32/csrss/win32csr/console.c
trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c
trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c
trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
trunk/reactos/subsystems/win32/csrss/win32csr/handle.c
trunk/reactos/subsystems/win32/csrss/win32csr/harderror.c
trunk/reactos/subsystems/win32/csrss/win32csr/w32csr.h
trunk/reactos/subsystems/win32/csrss/win32csr/win32csr.h
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -18,15 +18,15 @@
#define CsrAcquireProcessLock() LOCK
#define CsrReleaseProcessLock() UNLOCK
-extern NTSTATUS CallProcessInherit(PCSRSS_PROCESS_DATA, PCSRSS_PROCESS_DATA);
-extern NTSTATUS CallProcessDeleted(PCSRSS_PROCESS_DATA);
+extern NTSTATUS CallProcessInherit(PCSR_PROCESS, PCSR_PROCESS);
+extern NTSTATUS CallProcessDeleted(PCSR_PROCESS);
/* GLOBALS *******************************************************************/
static ULONG NrProcess;
-PCSRSS_PROCESS_DATA ProcessData[256];
+PCSR_PROCESS ProcessData[256];
RTL_CRITICAL_SECTION ProcessDataLock;
-extern PCSRSS_PROCESS_DATA CsrRootProcess;
+extern PCSR_PROCESS CsrRootProcess;
extern LIST_ENTRY CsrThreadHashTable[256];
/* FUNCTIONS *****************************************************************/
@@ -44,10 +44,10 @@
for (i = 0; i < 256; i++) InitializeListHead(&CsrThreadHashTable[i]);
}
-PCSRSS_PROCESS_DATA WINAPI CsrGetProcessData(HANDLE ProcessId)
+PCSR_PROCESS WINAPI CsrGetProcessData(HANDLE ProcessId)
{
ULONG hash;
- PCSRSS_PROCESS_DATA pProcessData;
+ PCSR_PROCESS pProcessData;
hash = ((ULONG_PTR)ProcessId >> 2) % (sizeof(ProcessData) /
sizeof(*ProcessData));
@@ -55,7 +55,7 @@
pProcessData = ProcessData[hash];
- while (pProcessData && pProcessData->ProcessId != ProcessId)
+ while (pProcessData && pProcessData->ClientId.UniqueProcess != ProcessId)
{
pProcessData = pProcessData->next;
}
@@ -63,10 +63,10 @@
return pProcessData;
}
-PCSRSS_PROCESS_DATA WINAPI CsrCreateProcessData(HANDLE ProcessId)
+PCSR_PROCESS WINAPI CsrCreateProcessData(HANDLE ProcessId)
{
ULONG hash;
- PCSRSS_PROCESS_DATA pProcessData;
+ PCSR_PROCESS pProcessData;
OBJECT_ATTRIBUTES ObjectAttributes;
CLIENT_ID ClientId;
NTSTATUS Status;
@@ -77,7 +77,7 @@
pProcessData = ProcessData[hash];
- while (pProcessData && pProcessData->ProcessId != ProcessId)
+ while (pProcessData && pProcessData->ClientId.UniqueProcess != ProcessId)
{
pProcessData = pProcessData->next;
}
@@ -85,15 +85,15 @@
{
pProcessData = RtlAllocateHeap(CsrHeap,
HEAP_ZERO_MEMORY,
- sizeof(CSRSS_PROCESS_DATA));
+ sizeof(CSR_PROCESS));
if (pProcessData)
{
- pProcessData->ProcessId = ProcessId;
+ pProcessData->ClientId.UniqueProcess = ProcessId;
pProcessData->next = ProcessData[hash];
ProcessData[hash] = pProcessData;
ClientId.UniqueThread = NULL;
- ClientId.UniqueProcess = pProcessData->ProcessId;
+ ClientId.UniqueProcess = pProcessData->ClientId.UniqueProcess;
InitializeObjectAttributes(&ObjectAttributes,
NULL,
0,
@@ -101,11 +101,11 @@
NULL);
/* using OpenProcess is not optimal due to HANDLE vs. DWORD PIDs... */
- Status = NtOpenProcess(&pProcessData->Process,
+ Status = NtOpenProcess(&pProcessData->ProcessHandle,
PROCESS_ALL_ACCESS,
&ObjectAttributes,
&ClientId);
- DPRINT("CSR Process: %p Handle: %p\n", pProcessData,
pProcessData->Process);
+ DPRINT("CSR Process: %p Handle: %p\n", pProcessData,
pProcessData->ProcessHandle);
if (!NT_SUCCESS(Status))
{
ProcessData[hash] = pProcessData->next;
@@ -129,7 +129,7 @@
}
else
{
- pProcessData->Terminated = FALSE;
+ pProcessData->Flags = ~CsrProcessTerminated;
/* Set default shutdown parameters */
pProcessData->ShutdownLevel = 0x280;
@@ -144,7 +144,7 @@
NTSTATUS WINAPI CsrFreeProcessData(HANDLE Pid)
{
ULONG hash;
- PCSRSS_PROCESS_DATA pProcessData, *pPrevLink;
+ PCSR_PROCESS pProcessData, *pPrevLink;
HANDLE Process;
PLIST_ENTRY NextEntry;
PCSR_THREAD Thread;
@@ -154,7 +154,7 @@
LOCK;
- while ((pProcessData = *pPrevLink) && pProcessData->ProcessId != Pid)
+ while ((pProcessData = *pPrevLink) && pProcessData->ClientId.UniqueProcess
!= Pid)
{
pPrevLink = &pProcessData->next;
}
@@ -162,7 +162,7 @@
if (pProcessData)
{
DPRINT("CsrFreeProcessData pid: %d\n", Pid);
- Process = pProcessData->Process;
+ Process = pProcessData->ProcessHandle;
CallProcessDeleted(pProcessData);
/* Dereference all process threads */
@@ -175,14 +175,14 @@
CsrThreadRefcountZero(Thread);
}
- if (pProcessData->CsrSectionViewBase)
+ if (pProcessData->ClientViewBase)
{
- NtUnmapViewOfSection(NtCurrentProcess(), pProcessData->CsrSectionViewBase);
+ NtUnmapViewOfSection(NtCurrentProcess(),
(PVOID)pProcessData->ClientViewBase);
}
- if (pProcessData->ServerCommunicationPort)
+ if (pProcessData->ClientPort)
{
- NtClose(pProcessData->ServerCommunicationPort);
+ NtClose(pProcessData->ClientPort);
}
*pPrevLink = pProcessData->next;
@@ -206,7 +206,7 @@
CSR_API(CsrCreateProcess)
{
- PCSRSS_PROCESS_DATA NewProcessData;
+ PCSR_PROCESS NewProcessData;
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
@@ -229,11 +229,11 @@
if (Request->Data.CreateProcessRequest.Flags & CREATE_NEW_PROCESS_GROUP)
{
- NewProcessData->ProcessGroup = (DWORD)(ULONG_PTR)NewProcessData->ProcessId;
+ NewProcessData->ProcessGroupId =
(DWORD)(ULONG_PTR)NewProcessData->ClientId.UniqueProcess;
}
else
{
- NewProcessData->ProcessGroup = ProcessData->ProcessGroup;
+ NewProcessData->ProcessGroupId = ProcessData->ProcessGroupId;
}
return(STATUS_SUCCESS);
@@ -244,7 +244,7 @@
PCSR_THREAD CurrentThread;
HANDLE ThreadHandle;
NTSTATUS Status;
- PCSRSS_PROCESS_DATA CsrProcess;
+ PCSR_PROCESS CsrProcess;
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
@@ -253,11 +253,11 @@
CsrProcess = CurrentThread->Process;
// DPRINT1("Current thread: %p %p\n", CurrentThread, CsrProcess);
// DPRINT1("Request CID: %lx %lx %lx\n",
-// CsrProcess->ProcessId,
+// CsrProcess->ClientId.UniqueProcess,
// NtCurrentTeb()->ClientId.UniqueProcess,
// Request->Data.CreateThreadRequest.ClientId.UniqueProcess);
- if (CsrProcess->ProcessId !=
Request->Data.CreateThreadRequest.ClientId.UniqueProcess)
+ if (CsrProcess->ClientId.UniqueProcess !=
Request->Data.CreateThreadRequest.ClientId.UniqueProcess)
{
if (Request->Data.CreateThreadRequest.ClientId.UniqueProcess ==
NtCurrentTeb()->ClientId.UniqueProcess)
{
@@ -270,12 +270,12 @@
if (!NT_SUCCESS(Status)) return Status;
}
-// DPRINT1("PIDs: %lx %lx\n", CurrentThread->Process->ProcessId,
CsrProcess->ProcessId);
+// DPRINT1("PIDs: %lx %lx\n",
CurrentThread->Process->ClientId.UniqueProcess,
CsrProcess->ClientId.UniqueProcess);
// DPRINT1("Thread handle is: %lx Process Handle is: %lx %lx\n",
// Request->Data.CreateThreadRequest.ThreadHandle,
- // CurrentThread->Process->Process,
+ // CurrentThread->Process->ProcessHandle,
// CsrProcess->Process);
- Status = NtDuplicateObject(CsrProcess->Process,
+ Status = NtDuplicateObject(CsrProcess->ProcessHandle,
Request->Data.CreateThreadRequest.ThreadHandle,
NtCurrentProcess(),
&ThreadHandle,
@@ -285,7 +285,7 @@
//DPRINT1("Duplicate status: %lx\n", Status);
if (!NT_SUCCESS(Status))
{
- Status = NtDuplicateObject(CurrentThread->Process->Process,
+ Status = NtDuplicateObject(CurrentThread->Process->ProcessHandle,
Request->Data.CreateThreadRequest.ThreadHandle,
NtCurrentProcess(),
&ThreadHandle,
@@ -327,7 +327,7 @@
}
- ProcessData->Terminated = TRUE;
+ ProcessData->Flags |= CsrProcessTerminated;
return STATUS_SUCCESS;
}
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -72,7 +72,7 @@
VOID
FASTCALL
-CsrApiCallHandler(PCSRSS_PROCESS_DATA ProcessData,
+CsrApiCallHandler(PCSR_PROCESS ProcessData,
PCSR_API_MESSAGE Request)
{
unsigned DefIndex;
@@ -108,13 +108,13 @@
}
BOOL
-CallHardError(IN PCSRSS_PROCESS_DATA ProcessData,
+CallHardError(IN PCSR_PROCESS ProcessData,
IN PHARDERROR_MSG HardErrorMessage);
static
VOID
NTAPI
-CsrHandleHardError(IN PCSRSS_PROCESS_DATA ProcessData,
+CsrHandleHardError(IN PCSR_PROCESS ProcessData,
IN OUT PHARDERROR_MSG Message)
{
DPRINT1("CSR: received hard error %lx\n", Message->Status);
@@ -275,7 +275,7 @@
*--*/
NTSTATUS
NTAPI
-CsrSrvAttachSharedSection(IN PCSRSS_PROCESS_DATA CsrProcess OPTIONAL,
+CsrSrvAttachSharedSection(IN PCSR_PROCESS CsrProcess OPTIONAL,
OUT PCSR_CONNECTION_INFO ConnectInfo)
{
NTSTATUS Status;
@@ -285,9 +285,9 @@
if (CsrProcess)
{
/* Map the section into this process */
- DPRINT("CSR Process Handle: %p. CSR Process: %p\n",
CsrProcess->Process, CsrProcess);
+ DPRINT("CSR Process Handle: %p. CSR Process: %p\n",
CsrProcess->ProcessHandle, CsrProcess);
Status = NtMapViewOfSection(CsrSrvSharedSection,
- CsrProcess->Process,
+ CsrProcess->ProcessHandle,
&CsrSrvSharedSectionBase,
0,
0,
@@ -701,7 +701,7 @@
{
NTSTATUS Status;
HANDLE ServerPort = NULL, ServerThread = NULL;
- PCSRSS_PROCESS_DATA ProcessData = NULL;
+ PCSR_PROCESS ProcessData = NULL;
REMOTE_PORT_VIEW LpcRead;
CLIENT_ID ClientId;
BOOLEAN AllowConnection = FALSE;
@@ -728,7 +728,7 @@
}
}
- if (ProcessData->Process == NULL)
+ if (ProcessData->ProcessHandle == NULL)
{
OBJECT_ATTRIBUTES ObjectAttributes;
@@ -739,11 +739,11 @@
NULL);
DPRINT1("WARNING: CSR PROCESS WITH NO CSR PROCESS HANDLE???\n");
ClientId.UniqueThread = 0;
- Status = NtOpenProcess(&ProcessData->Process,
+ Status = NtOpenProcess(&ProcessData->ProcessHandle,
PROCESS_ALL_ACCESS,
&ObjectAttributes,
&Request->ClientId);
- DPRINT1("Status: %lx. Handle: %lx\n", Status,
ProcessData->Process);
+ DPRINT1("Status: %lx. Handle: %lx\n", Status,
ProcessData->ProcessHandle);
}
if (ProcessData)
@@ -773,9 +773,9 @@
return Status;
}
- ProcessData->CsrSectionViewBase = LpcRead.ViewBase;
- ProcessData->CsrSectionViewSize = LpcRead.ViewSize;
- ProcessData->ServerCommunicationPort = ServerPort;
+ ProcessData->ClientViewBase = (ULONG_PTR)LpcRead.ViewBase;
+ ProcessData->ClientViewBounds = LpcRead.ViewSize;
+ ProcessData->ClientPort = ServerPort;
if (AllowConnection) Status = NtCompleteConnectPort(ServerPort);
if (!NT_SUCCESS(Status))
@@ -866,7 +866,7 @@
BYTE RawRequest[LPC_MAX_DATA_LENGTH];
PCSR_API_MESSAGE Request = (PCSR_API_MESSAGE)RawRequest;
PCSR_API_MESSAGE Reply;
- PCSRSS_PROCESS_DATA ProcessData;
+ PCSR_PROCESS ProcessData;
PCSR_THREAD ServerThread;
DPRINT("CSR: %s called\n", __FUNCTION__);
@@ -947,7 +947,7 @@
Request->Header.ClientId.UniqueProcess);
break;
}
- if (ProcessData->Terminated)
+ if (ProcessData->Flags & CsrProcessTerminated)
{
DPRINT1("Message %d: process %d already terminated\n",
Request->Type, Request->Header.ClientId.UniqueProcess);
@@ -963,7 +963,7 @@
else
{
PCSR_THREAD Thread;
- PCSRSS_PROCESS_DATA Process = NULL;
+ PCSR_PROCESS Process = NULL;
//DPRINT1("locate thread %lx/%lx\n",
Request->Header.ClientId.UniqueProcess, Request->Header.ClientId.UniqueThread);
Thread = CsrLocateThreadByClientId(&Process,
&Request->Header.ClientId);
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/init.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/init.c [iso-8859-1] Wed Feb 15 20:29:08
2012
@@ -65,7 +65,7 @@
}
BOOL
-CallHardError(IN PCSRSS_PROCESS_DATA ProcessData,
+CallHardError(IN PCSR_PROCESS ProcessData,
IN PHARDERROR_MSG HardErrorMessage)
{
BOOL Ok;
@@ -83,8 +83,8 @@
}
NTSTATUS
-CallProcessInherit(IN PCSRSS_PROCESS_DATA SourceProcessData,
- IN PCSRSS_PROCESS_DATA TargetProcessData)
+CallProcessInherit(IN PCSR_PROCESS SourceProcessData,
+ IN PCSR_PROCESS TargetProcessData)
{
NTSTATUS Status = STATUS_SUCCESS;
unsigned i;
@@ -98,7 +98,7 @@
}
NTSTATUS
-CallProcessDeleted(IN PCSRSS_PROCESS_DATA ProcessData)
+CallProcessDeleted(IN PCSR_PROCESS ProcessData)
{
NTSTATUS Status = STATUS_SUCCESS;
unsigned i;
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/procsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/procsup.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/procsup.c [iso-8859-1] Wed Feb 15 20:29:08
2012
@@ -23,8 +23,8 @@
/* GLOBALS ********************************************************************/
extern RTL_CRITICAL_SECTION ProcessDataLock;
-extern PCSRSS_PROCESS_DATA ProcessData[256];
-PCSRSS_PROCESS_DATA CsrRootProcess;
+extern PCSR_PROCESS ProcessData[256];
+PCSR_PROCESS CsrRootProcess;
SECURITY_QUALITY_OF_SERVICE CsrSecurityQos =
{
sizeof(SECURITY_QUALITY_OF_SERVICE),
@@ -221,12 +221,12 @@
return NT_SUCCESS(Status);
}
-PCSRSS_PROCESS_DATA
+PCSR_PROCESS
NTAPI
FindProcessForShutdown(IN PLUID CallerLuid)
{
ULONG Hash;
- PCSRSS_PROCESS_DATA CsrProcess, ReturnCsrProcess = NULL;
+ PCSR_PROCESS CsrProcess, ReturnCsrProcess = NULL;
NTSTATUS Status;
ULONG Level = 0;
LUID ProcessLuid;
@@ -243,7 +243,7 @@
if (CsrProcess->Flags & CsrProcessSkipShutdown) goto Next;
/* Get the LUID of this Process */
- Status = CsrGetProcessLuid(CsrProcess->Process, &ProcessLuid);
+ Status = CsrGetProcessLuid(CsrProcess->ProcessHandle, &ProcessLuid);
/* Check if we didn't get access to the LUID */
if (Status == STATUS_ACCESS_DENIED)
@@ -303,7 +303,7 @@
{
PVOID* RealContext = (PVOID*)Context;
PLUID CallerLuid = RealContext[0];
- PCSRSS_PROCESS_DATA CsrProcess = NULL;
+ PCSR_PROCESS CsrProcess = NULL;
NTSTATUS Status = STATUS_UNSUCCESSFUL;
BOOLEAN FirstTry;
ULONG Result = 0;
@@ -349,7 +349,7 @@
LoopAgain:
/* Release the lock, make the callback, and acquire it back */
- //DPRINT1("Found process: %lx\n", CsrProcess->ProcessId);
+ //DPRINT1("Found process: %lx\n",
CsrProcess->ClientId.UniqueProcess);
CsrReleaseProcessLock();
Result = (ULONG)EnumProc(CsrProcess, (PVOID)((ULONG_PTR)Context | FirstTry));
CsrAcquireProcessLock();
@@ -391,10 +391,10 @@
NTSTATUS
NTAPI
CsrLockProcessByClientId(IN HANDLE Pid,
- OUT PCSRSS_PROCESS_DATA *CsrProcess OPTIONAL)
+ OUT PCSR_PROCESS *CsrProcess OPTIONAL)
{
ULONG Hash;
- PCSRSS_PROCESS_DATA CurrentProcess = NULL;
+ PCSR_PROCESS CurrentProcess = NULL;
NTSTATUS Status = STATUS_UNSUCCESSFUL;
/* Acquire the lock */
@@ -408,7 +408,7 @@
while (CurrentProcess)
{
/* Check for PID match */
- if (CurrentProcess->ProcessId == Pid)
+ if (CurrentProcess->ClientId.UniqueProcess == Pid)
{
/* Get out of here with success */
// DPRINT1("Found %p for PID %lx\n", CurrentProcess, Pid);
@@ -432,7 +432,7 @@
NTSTATUS
NTAPI
-CsrUnlockProcess(IN PCSRSS_PROCESS_DATA CsrProcess)
+CsrUnlockProcess(IN PCSR_PROCESS CsrProcess)
{
/* Dereference the process */
//CsrLockedDereferenceProcess(CsrProcess);
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/thredsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/thredsup.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/thredsup.c [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -26,9 +26,9 @@
/* GLOBALS ********************************************************************/
LIST_ENTRY CsrThreadHashTable[256];
-extern PCSRSS_PROCESS_DATA CsrRootProcess;
+extern PCSR_PROCESS CsrRootProcess;
extern RTL_CRITICAL_SECTION ProcessDataLock;
-extern PCSRSS_PROCESS_DATA ProcessData[256];
+extern PCSR_PROCESS ProcessData[256];
/* FUNCTIONS ******************************************************************/
@@ -112,7 +112,7 @@
PCSR_THREAD
NTAPI
-CsrAllocateThread(IN PCSRSS_PROCESS_DATA CsrProcess)
+CsrAllocateThread(IN PCSR_PROCESS CsrProcess)
{
PCSR_THREAD CsrThread;
@@ -133,7 +133,7 @@
PCSR_THREAD
NTAPI
-CsrLocateThreadByClientId(OUT PCSRSS_PROCESS_DATA *Process OPTIONAL,
+CsrLocateThreadByClientId(OUT PCSR_PROCESS *Process OPTIONAL,
IN PCLIENT_ID ClientId)
{
ULONG i;
@@ -174,7 +174,7 @@
PCSR_THREAD
NTAPI
-CsrLocateThreadInProcess(IN PCSRSS_PROCESS_DATA CsrProcess OPTIONAL,
+CsrLocateThreadInProcess(IN PCSR_PROCESS CsrProcess OPTIONAL,
IN PCLIENT_ID Cid)
{
PLIST_ENTRY ListHead, NextEntry;
@@ -208,7 +208,7 @@
VOID
NTAPI
-CsrInsertThread(IN PCSRSS_PROCESS_DATA Process,
+CsrInsertThread(IN PCSR_PROCESS Process,
IN PCSR_THREAD Thread)
{
ULONG i;
@@ -295,12 +295,12 @@
NTSTATUS
NTAPI
-CsrCreateThread(IN PCSRSS_PROCESS_DATA CsrProcess,
+CsrCreateThread(IN PCSR_PROCESS CsrProcess,
IN HANDLE hThread,
IN PCLIENT_ID ClientId)
{
PCSR_THREAD CsrThread;
- //PCSRSS_PROCESS_DATA CurrentProcess;
+ //PCSR_PROCESS CurrentProcess;
//PCSR_THREAD CurrentThread = NtCurrentTeb()->CsrClientThread;
//CLIENT_ID CurrentCid;
KERNEL_USER_TIMES KernelTimes;
Modified: trunk/reactos/subsystems/win32/csrss/include/api.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/inc…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/include/api.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/include/api.h [iso-8859-1] Wed Feb 15 20:29:08
2012
@@ -45,31 +45,47 @@
CsrProcessIsConsoleApp = 0x800
} CSR_PROCESS_FLAGS, *PCSR_PROCESS_FLAGS;
-typedef struct _CSRSS_PROCESS_DATA
+typedef struct _CSRSS_CON_PROCESS_DATA
{
- struct tagCSRSS_CONSOLE *Console;
- struct tagCSRSS_CONSOLE *ParentConsole;
- BOOL bInheritHandles;
- RTL_CRITICAL_SECTION HandleTableLock;
- ULONG HandleTableSize;
- struct _CSRSS_HANDLE *HandleTable;
- HANDLE ProcessId;
- DWORD ProcessGroup;
- HANDLE Process;
- ULONG ShutdownLevel;
- ULONG ShutdownFlags;
- HANDLE ConsoleEvent;
- PVOID CsrSectionViewBase;
- ULONG CsrSectionViewSize;
- HANDLE ServerCommunicationPort;
- struct _CSRSS_PROCESS_DATA * next;
- LIST_ENTRY ProcessEntry;
- PCONTROLDISPATCHER CtrlDispatcher;
- BOOL Terminated;
- ULONG Flags;
- ULONG ThreadCount;
- LIST_ENTRY ThreadList;
-} CSRSS_PROCESS_DATA, *PCSRSS_PROCESS_DATA;
+ HANDLE ConsoleEvent;
+ struct tagCSRSS_CONSOLE *Console;
+ struct tagCSRSS_CONSOLE *ParentConsole;
+ BOOL bInheritHandles;
+ RTL_CRITICAL_SECTION HandleTableLock;
+ ULONG HandleTableSize;
+ struct _CSRSS_HANDLE *HandleTable;
+ PCONTROLDISPATCHER CtrlDispatcher;
+} CSRSS_CON_PROCESS_DATA, *PCSRSS_CON_PROCESS_DATA;
+
+typedef struct _CSR_PROCESS
+{
+ CLIENT_ID ClientId;
+ LIST_ENTRY ListLink;
+ LIST_ENTRY ThreadList;
+ struct _CSR_PROCESS *Parent;
+// PCSR_NT_SESSION NtSession;
+ ULONG ExpectedVersion;
+ HANDLE ClientPort;
+ ULONG_PTR ClientViewBase;
+ ULONG_PTR ClientViewBounds;
+ HANDLE ProcessHandle;
+ ULONG SequenceNumber;
+ ULONG Flags;
+ ULONG DebugFlags;
+ CLIENT_ID DebugCid;
+ ULONG ReferenceCount;
+ ULONG ProcessGroupId;
+ ULONG ProcessGroupSequence;
+ ULONG fVDM;
+ ULONG ThreadCount;
+ ULONG PriorityClass;
+ ULONG Reserved;
+ ULONG ShutdownLevel;
+ ULONG ShutdownFlags;
+// PVOID ServerData[ANYSIZE_ARRAY];
+ struct _CSR_PROCESS* next;
+ CSRSS_CON_PROCESS_DATA;
+} CSR_PROCESS, *PCSR_PROCESS;
typedef struct _CSR_THREAD
{
@@ -77,7 +93,7 @@
LIST_ENTRY Link;
LIST_ENTRY HashLinks;
CLIENT_ID ClientId;
- PCSRSS_PROCESS_DATA Process;
+ PCSR_PROCESS Process;
//struct _CSR_WAIT_BLOCK *WaitBlock;
HANDLE ThreadHandle;
ULONG Flags;
@@ -85,7 +101,7 @@
ULONG ImpersonationCount;
} CSR_THREAD, *PCSR_THREAD;
-typedef NTSTATUS (WINAPI *CSRSS_API_PROC)(PCSRSS_PROCESS_DATA ProcessData,
+typedef NTSTATUS (WINAPI *CSRSS_API_PROC)(PCSR_PROCESS ProcessData,
PCSR_API_MESSAGE Request);
typedef struct _CSRSS_API_DEFINITION
@@ -106,7 +122,7 @@
} CSRSS_LISTEN_DATA, *PCSRSS_LISTEN_DATA;
#define CSR_API(n) NTSTATUS WINAPI n (\
-PCSRSS_PROCESS_DATA ProcessData,\
+PCSR_PROCESS ProcessData,\
PCSR_API_MESSAGE Request)
/* init.c */
@@ -123,11 +139,11 @@
PCSR_THREAD
NTAPI
-CsrAllocateThread(IN PCSRSS_PROCESS_DATA CsrProcess);
+CsrAllocateThread(IN PCSR_PROCESS CsrProcess);
/* api/wapi.c */
NTSTATUS FASTCALL CsrApiRegisterDefinitions(PCSRSS_API_DEFINITION NewDefinitions);
-VOID FASTCALL CsrApiCallHandler(PCSRSS_PROCESS_DATA ProcessData,
+VOID FASTCALL CsrApiCallHandler(PCSR_PROCESS ProcessData,
PCSR_API_MESSAGE Request);
VOID WINAPI CsrSbApiRequestThread (PVOID PortHandle);
VOID NTAPI ClientConnectionThread(HANDLE ServerPort);
@@ -135,19 +151,19 @@
extern HANDLE CsrSbApiPort;
/* api/process.c */
-typedef NTSTATUS (WINAPI *CSRSS_ENUM_PROCESS_PROC)(PCSRSS_PROCESS_DATA ProcessData,
+typedef NTSTATUS (WINAPI *CSRSS_ENUM_PROCESS_PROC)(PCSR_PROCESS ProcessData,
PVOID Context);
VOID WINAPI CsrInitProcessData(VOID);
-PCSRSS_PROCESS_DATA WINAPI CsrGetProcessData(HANDLE ProcessId);
-PCSRSS_PROCESS_DATA WINAPI CsrCreateProcessData(HANDLE ProcessId);
+PCSR_PROCESS WINAPI CsrGetProcessData(HANDLE ProcessId);
+PCSR_PROCESS WINAPI CsrCreateProcessData(HANDLE ProcessId);
NTSTATUS WINAPI CsrFreeProcessData( HANDLE Pid );
NTSTATUS WINAPI CsrEnumProcesses(CSRSS_ENUM_PROCESS_PROC EnumProc, PVOID Context);
PCSR_THREAD NTAPI CsrAddStaticServerThread(IN HANDLE hThread, IN PCLIENT_ID ClientId, IN
ULONG ThreadFlags);
-PCSR_THREAD NTAPI CsrLocateThreadInProcess(IN PCSRSS_PROCESS_DATA CsrProcess OPTIONAL, IN
PCLIENT_ID Cid);
-PCSR_THREAD NTAPI CsrLocateThreadByClientId(OUT PCSRSS_PROCESS_DATA *Process OPTIONAL, IN
PCLIENT_ID ClientId);
-NTSTATUS NTAPI CsrLockProcessByClientId(IN HANDLE Pid, OUT PCSRSS_PROCESS_DATA
*CsrProcess OPTIONAL);
-NTSTATUS NTAPI CsrCreateThread(IN PCSRSS_PROCESS_DATA CsrProcess, IN HANDLE hThread, IN
PCLIENT_ID ClientId);
-NTSTATUS NTAPI CsrUnlockProcess(IN PCSRSS_PROCESS_DATA CsrProcess);
+PCSR_THREAD NTAPI CsrLocateThreadInProcess(IN PCSR_PROCESS CsrProcess OPTIONAL, IN
PCLIENT_ID Cid);
+PCSR_THREAD NTAPI CsrLocateThreadByClientId(OUT PCSR_PROCESS *Process OPTIONAL, IN
PCLIENT_ID ClientId);
+NTSTATUS NTAPI CsrLockProcessByClientId(IN HANDLE Pid, OUT PCSR_PROCESS *CsrProcess
OPTIONAL);
+NTSTATUS NTAPI CsrCreateThread(IN PCSR_PROCESS CsrProcess, IN HANDLE hThread, IN
PCLIENT_ID ClientId);
+NTSTATUS NTAPI CsrUnlockProcess(IN PCSR_PROCESS CsrProcess);
//hack
VOID NTAPI CsrThreadRefcountZero(IN PCSR_THREAD CsrThread);
Modified: trunk/reactos/subsystems/win32/csrss/include/csrplugin.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/inc…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/include/csrplugin.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/include/csrplugin.h [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -31,13 +31,13 @@
typedef BOOL (WINAPI *CSRPLUGIN_INIT_COMPLETE_PROC)(void);
-typedef BOOL (WINAPI *CSRPLUGIN_HARDERROR_PROC)(IN PCSRSS_PROCESS_DATA ProcessData,
+typedef BOOL (WINAPI *CSRPLUGIN_HARDERROR_PROC)(IN PCSR_PROCESS ProcessData,
IN PHARDERROR_MSG HardErrorMessage);
-typedef NTSTATUS (WINAPI *CSRPLUGIN_PROCESS_INHERIT_PROC)(IN PCSRSS_PROCESS_DATA
SourceProcessData,
- IN PCSRSS_PROCESS_DATA
TargetProcessData);
+typedef NTSTATUS (WINAPI *CSRPLUGIN_PROCESS_INHERIT_PROC)(IN PCSR_PROCESS
SourceProcessData,
+ IN PCSR_PROCESS
TargetProcessData);
-typedef NTSTATUS (WINAPI *CSRPLUGIN_PROCESS_DELETED_PROC)(IN PCSRSS_PROCESS_DATA
ProcessData);
+typedef NTSTATUS (WINAPI *CSRPLUGIN_PROCESS_DELETED_PROC)(IN PCSR_PROCESS ProcessData);
typedef struct tagCSRSS_SERVER_PROCS
{
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -367,13 +367,13 @@
(er.Event.KeyEvent.wVirtualKeyCode == 'C')) &&
(er.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED |
RIGHT_CTRL_PRESSED) || KeyState[VK_CONTROL] & 0x80))
{
- PCSRSS_PROCESS_DATA current;
+ PCSR_PROCESS current;
PLIST_ENTRY current_entry;
DPRINT1("Console_Api Ctrl-C\n");
current_entry = Console->ProcessList.Flink;
while (current_entry != &Console->ProcessList)
{
- current = CONTAINING_RECORD(current_entry, CSRSS_PROCESS_DATA,
ProcessEntry);
+ current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ListLink);
current_entry = current_entry->Flink;
ConioConsoleCtrlEvent((DWORD)CTRL_C_EVENT, current);
}
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/conio.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/conio.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/conio.h [iso-8859-1] Wed Feb 15 20:29:08
2012
@@ -141,13 +141,13 @@
#define ConioResizeBuffer(Console, Buff, Size)
(Console)->Vtbl->ResizeBuffer(Console, Buff, Size)
/* console.c */
-NTSTATUS FASTCALL ConioConsoleFromProcessData(PCSRSS_PROCESS_DATA ProcessData,
PCSRSS_CONSOLE *Console);
+NTSTATUS FASTCALL ConioConsoleFromProcessData(PCSR_PROCESS ProcessData, PCSRSS_CONSOLE
*Console);
VOID WINAPI ConioDeleteConsole(Object_t *Object);
VOID WINAPI CsrInitConsoleSupport(VOID);
VOID FASTCALL ConioPause(PCSRSS_CONSOLE Console, UINT Flags);
VOID FASTCALL ConioUnpause(PCSRSS_CONSOLE Console, UINT Flags);
-VOID FASTCALL ConioConsoleCtrlEvent(DWORD Event, PCSRSS_PROCESS_DATA ProcessData);
-VOID FASTCALL ConioConsoleCtrlEventTimeout(DWORD Event, PCSRSS_PROCESS_DATA ProcessData,
+VOID FASTCALL ConioConsoleCtrlEvent(DWORD Event, PCSR_PROCESS ProcessData);
+VOID FASTCALL ConioConsoleCtrlEventTimeout(DWORD Event, PCSR_PROCESS ProcessData,
DWORD Timeout);
CSR_API(CsrAllocConsole);
CSR_API(CsrFreeConsole);
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/conoutput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/conoutput.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/conoutput.c [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -389,7 +389,7 @@
if (Console->UnpauseEvent)
{
Status = NtDuplicateObject(GetCurrentProcess(), Console->UnpauseEvent,
- ProcessData->Process,
&Request->Data.WriteConsoleRequest.UnpauseEvent,
+ ProcessData->ProcessHandle,
&Request->Data.WriteConsoleRequest.UnpauseEvent,
SYNCHRONIZE, 0, 0);
ConioUnlockScreenBuffer(Buff);
return NT_SUCCESS(Status) ? STATUS_PENDING : Status;
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/console.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/console.c [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -15,7 +15,7 @@
/* FUNCTIONS *****************************************************************/
NTSTATUS FASTCALL
-ConioConsoleFromProcessData(PCSRSS_PROCESS_DATA ProcessData, PCSRSS_CONSOLE *Console)
+ConioConsoleFromProcessData(PCSR_PROCESS ProcessData, PCSRSS_CONSOLE *Console)
{
PCSRSS_CONSOLE ProcessConsole;
@@ -38,16 +38,16 @@
}
VOID FASTCALL
-ConioConsoleCtrlEventTimeout(DWORD Event, PCSRSS_PROCESS_DATA ProcessData, DWORD
Timeout)
+ConioConsoleCtrlEventTimeout(DWORD Event, PCSR_PROCESS ProcessData, DWORD Timeout)
{
HANDLE Thread;
- DPRINT("ConioConsoleCtrlEvent Parent ProcessId = %x\n",
ProcessData->ProcessId);
+ DPRINT("ConioConsoleCtrlEvent Parent ProcessId = %x\n",
ProcessData->ClientId.UniqueProcess);
if (ProcessData->CtrlDispatcher)
{
- Thread = CreateRemoteThread(ProcessData->Process, NULL, 0,
+ Thread = CreateRemoteThread(ProcessData->ProcessHandle, NULL, 0,
(LPTHREAD_START_ROUTINE)
ProcessData->CtrlDispatcher,
UlongToPtr(Event), 0, NULL);
if (NULL == Thread)
@@ -61,7 +61,7 @@
}
VOID FASTCALL
-ConioConsoleCtrlEvent(DWORD Event, PCSRSS_PROCESS_DATA ProcessData)
+ConioConsoleCtrlEvent(DWORD Event, PCSR_PROCESS ProcessData)
{
ConioConsoleCtrlEventTimeout(Event, ProcessData, 0);
}
@@ -215,7 +215,7 @@
/* initialize list head */
InitializeListHead(&Console->ProcessList);
/* insert process data required for GUI initialization */
- InsertHeadList(&Console->ProcessList, &ProcessData->ProcessEntry);
+ InsertHeadList(&Console->ProcessList, &ProcessData->ListLink);
/* Initialize the Console */
Status = CsrInitConsole(Console, Request->Data.AllocConsoleRequest.ShowCmd);
if (!NT_SUCCESS(Status))
@@ -280,7 +280,7 @@
/* Duplicate the Event */
if (!DuplicateHandle(GetCurrentProcess(),
ProcessData->Console->ActiveEvent,
- ProcessData->Process,
+ ProcessData->ProcessHandle,
&ProcessData->ConsoleEvent,
EVENT_ALL_ACCESS,
FALSE,
@@ -307,7 +307,7 @@
if (!NewConsole)
{
/* Insert into the list if it has not been added */
- InsertHeadList(&ProcessData->Console->ProcessList,
&ProcessData->ProcessEntry);
+ InsertHeadList(&ProcessData->Console->ProcessList,
&ProcessData->ListLink);
}
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
@@ -762,7 +762,7 @@
{
PDWORD Buffer;
PCSRSS_CONSOLE Console;
- PCSRSS_PROCESS_DATA current;
+ PCSR_PROCESS current;
PLIST_ENTRY current_entry;
ULONG nItems = 0;
NTSTATUS Status;
@@ -786,10 +786,10 @@
current_entry != &Console->ProcessList;
current_entry = current_entry->Flink)
{
- current = CONTAINING_RECORD(current_entry, CSRSS_PROCESS_DATA, ProcessEntry);
+ current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ListLink);
if (++nItems <= Request->Data.GetProcessListRequest.nMaxIds)
{
- *Buffer++ = HandleToUlong(current->ProcessId);
+ *Buffer++ = HandleToUlong(current->ClientId.UniqueProcess);
}
}
@@ -802,7 +802,7 @@
CSR_API(CsrGenerateCtrlEvent)
{
PCSRSS_CONSOLE Console;
- PCSRSS_PROCESS_DATA current;
+ PCSR_PROCESS current;
PLIST_ENTRY current_entry;
DWORD Group;
NTSTATUS Status;
@@ -822,8 +822,8 @@
current_entry != &Console->ProcessList;
current_entry = current_entry->Flink)
{
- current = CONTAINING_RECORD(current_entry, CSRSS_PROCESS_DATA, ProcessEntry);
- if (Group == 0 || current->ProcessGroup == Group)
+ current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ListLink);
+ if (Group == 0 || current->ProcessGroupId == Group)
{
ConioConsoleCtrlEvent(Request->Data.GenerateCtrlEvent.Event, current);
Status = STATUS_SUCCESS;
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -278,7 +278,7 @@
/* Ensure that a captured buffer is safe to access */
BOOL FASTCALL
-Win32CsrValidateBuffer(PCSRSS_PROCESS_DATA ProcessData, PVOID Buffer,
+Win32CsrValidateBuffer(PCSR_PROCESS ProcessData, PVOID Buffer,
SIZE_T NumElements, SIZE_T ElementSize)
{
/* Check that the following conditions are true:
@@ -289,14 +289,14 @@
* instead of division; remember that 2147483648 * 2 = 0.)
* 3. The buffer is DWORD-aligned.
*/
- ULONG_PTR Offset = (BYTE *)Buffer - (BYTE *)ProcessData->CsrSectionViewBase;
- if (Offset >= ProcessData->CsrSectionViewSize
- || NumElements > (ProcessData->CsrSectionViewSize - Offset) /
ElementSize
+ ULONG_PTR Offset = (BYTE *)Buffer - (BYTE *)ProcessData->ClientViewBase;
+ if (Offset >= ProcessData->ClientViewBounds
+ || NumElements > (ProcessData->ClientViewBounds - Offset) /
ElementSize
|| (Offset & (sizeof(DWORD) - 1)) != 0)
{
DPRINT1("Invalid buffer %p(%u*%u); section view is %p(%u)\n",
Buffer, NumElements, ElementSize,
- ProcessData->CsrSectionViewBase, ProcessData->CsrSectionViewSize);
+ ProcessData->ClientViewBase, ProcessData->ClientViewBounds);
return FALSE;
}
return TRUE;
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -462,7 +462,7 @@
}
static BOOL FASTCALL
-NotifyAndTerminateProcess(PCSRSS_PROCESS_DATA ProcessData,
+NotifyAndTerminateProcess(PCSR_PROCESS ProcessData,
PSHUTDOWN_SETTINGS ShutdownSettings,
UINT Flags)
{
@@ -481,7 +481,7 @@
}
else
{
- Context.ProcessId = (DWORD_PTR) ProcessData->ProcessId;
+ Context.ProcessId = (DWORD_PTR) ProcessData->ClientId.UniqueProcess;
Context.wParam = 0;
Context.lParam = (0 != (Flags & EWX_INTERNAL_FLAG_LOGOFF) ?
ENDSESSION_LOGOFF : 0);
@@ -527,10 +527,10 @@
/* Terminate this process */
Process = OpenProcess(PROCESS_TERMINATE, FALSE,
- (DWORD_PTR) ProcessData->ProcessId);
+ (DWORD_PTR) ProcessData->ClientId.UniqueProcess);
if (NULL == Process)
{
- DPRINT1("Unable to open process %d, error %d\n",
ProcessData->ProcessId,
+ DPRINT1("Unable to open process %d, error %d\n",
ProcessData->ClientId.UniqueProcess,
GetLastError());
return TRUE;
}
@@ -543,35 +543,35 @@
typedef struct tagPROCESS_ENUM_CONTEXT
{
UINT ProcessCount;
- PCSRSS_PROCESS_DATA *ProcessData;
+ PCSR_PROCESS *ProcessData;
TOKEN_ORIGIN TokenOrigin;
DWORD ShellProcess;
DWORD CsrssProcess;
} PROCESS_ENUM_CONTEXT, *PPROCESS_ENUM_CONTEXT;
static NTSTATUS WINAPI
-ExitReactosProcessEnum(PCSRSS_PROCESS_DATA ProcessData, PVOID Data)
+ExitReactosProcessEnum(PCSR_PROCESS ProcessData, PVOID Data)
{
HANDLE Process;
HANDLE Token;
TOKEN_ORIGIN Origin;
DWORD ReturnLength;
PPROCESS_ENUM_CONTEXT Context = (PPROCESS_ENUM_CONTEXT) Data;
- PCSRSS_PROCESS_DATA *NewData;
+ PCSR_PROCESS *NewData;
/* Do not kill winlogon or csrss */
- if ((DWORD_PTR) ProcessData->ProcessId == Context->CsrssProcess ||
- ProcessData->ProcessId == LogonProcess)
+ if ((DWORD_PTR) ProcessData->ClientId.UniqueProcess == Context->CsrssProcess
||
+ ProcessData->ClientId.UniqueProcess == LogonProcess)
{
return STATUS_SUCCESS;
}
/* Get the login session of this process */
Process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE,
- (DWORD_PTR) ProcessData->ProcessId);
+ (DWORD_PTR) ProcessData->ClientId.UniqueProcess);
if (NULL == Process)
{
- DPRINT1("Unable to open process %d, error %d\n",
ProcessData->ProcessId,
+ DPRINT1("Unable to open process %d, error %d\n",
ProcessData->ClientId.UniqueProcess,
GetLastError());
return STATUS_UNSUCCESSFUL;
}
@@ -579,7 +579,7 @@
if (! OpenProcessToken(Process, TOKEN_QUERY, &Token))
{
DPRINT1("Unable to open token for process %d, error %d\n",
- ProcessData->ProcessId, GetLastError());
+ ProcessData->ClientId.UniqueProcess, GetLastError());
CloseHandle(Process);
return STATUS_UNSUCCESSFUL;
}
@@ -589,7 +589,7 @@
sizeof(TOKEN_ORIGIN), &ReturnLength))
{
DPRINT1("GetTokenInformation failed for process %d with error %d\n",
- ProcessData->ProcessId, GetLastError());
+ ProcessData->ClientId.UniqueProcess, GetLastError());
CloseHandle(Token);
return STATUS_UNSUCCESSFUL;
}
@@ -600,12 +600,12 @@
&(Origin.OriginatingLogonSession)))
{
/* Kill the shell process last */
- if ((DWORD_PTR) ProcessData->ProcessId == Context->ShellProcess)
+ if ((DWORD_PTR) ProcessData->ClientId.UniqueProcess ==
Context->ShellProcess)
{
ProcessData->ShutdownLevel = 0;
}
NewData = HeapAlloc(Win32CsrApiHeap, 0, (Context->ProcessCount + 1)
- * sizeof(PCSRSS_PROCESS_DATA));
+ * sizeof(PCSR_PROCESS));
if (NULL == NewData)
{
return STATUS_NO_MEMORY;
@@ -613,7 +613,7 @@
if (0 != Context->ProcessCount)
{
memcpy(NewData, Context->ProcessData,
- Context->ProcessCount * sizeof(PCSRSS_PROCESS_DATA));
+ Context->ProcessCount * sizeof(PCSR_PROCESS));
HeapFree(Win32CsrApiHeap, 0, Context->ProcessData);
}
Context->ProcessData = NewData;
@@ -627,8 +627,8 @@
static int
ProcessDataCompare(const void *Elem1, const void *Elem2)
{
- const PCSRSS_PROCESS_DATA *ProcessData1 = (PCSRSS_PROCESS_DATA *) Elem1;
- const PCSRSS_PROCESS_DATA *ProcessData2 = (PCSRSS_PROCESS_DATA *) Elem2;
+ const PCSR_PROCESS *ProcessData1 = (PCSR_PROCESS *) Elem1;
+ const PCSR_PROCESS *ProcessData2 = (PCSR_PROCESS *) Elem2;
if ((*ProcessData1)->ShutdownLevel < (*ProcessData2)->ShutdownLevel)
{
@@ -638,11 +638,11 @@
{
return -1;
}
- else if ((*ProcessData1)->ProcessId < (*ProcessData2)->ProcessId)
+ else if ((*ProcessData1)->ClientId.UniqueProcess <
(*ProcessData2)->ClientId.UniqueProcess)
{
return +1;
}
- else if ((*ProcessData2)->ProcessId < (*ProcessData1)->ProcessId)
+ else if ((*ProcessData2)->ClientId.UniqueProcess <
(*ProcessData1)->ClientId.UniqueProcess)
{
return -1;
}
@@ -864,7 +864,7 @@
return Status;
}
- qsort(Context.ProcessData, Context.ProcessCount, sizeof(PCSRSS_PROCESS_DATA),
+ qsort(Context.ProcessData, Context.ProcessCount, sizeof(PCSR_PROCESS),
ProcessDataCompare);
/* Terminate processes, stop if we find one kicking and screaming it doesn't
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -393,15 +393,15 @@
GuiConsoleWriteUserSettings(PCSRSS_CONSOLE Console, PGUI_CONSOLE_DATA GuiData)
{
HKEY hKey;
- PCSRSS_PROCESS_DATA ProcessData;
+ PCSR_PROCESS ProcessData;
if (Console->ProcessList.Flink == &Console->ProcessList)
{
DPRINT("GuiConsoleWriteUserSettings: No Process!!!\n");
return;
}
- ProcessData = CONTAINING_RECORD(Console->ProcessList.Flink, CSRSS_PROCESS_DATA,
ProcessEntry);
- if (!GuiConsoleOpenUserSettings(GuiData, PtrToUlong(ProcessData->ProcessId),
&hKey, KEY_READ | KEY_WRITE, TRUE))
+ ProcessData = CONTAINING_RECORD(Console->ProcessList.Flink, CSR_PROCESS,
ListLink);
+ if (!GuiConsoleOpenUserSettings(GuiData,
PtrToUlong(ProcessData->ClientId.UniqueProcess), &hKey, KEY_READ | KEY_WRITE,
TRUE))
{
return;
}
@@ -690,7 +690,7 @@
HFONT OldFont;
TEXTMETRICW Metrics;
SIZE CharSize;
- PCSRSS_PROCESS_DATA ProcessData;
+ PCSR_PROCESS ProcessData;
HKEY hKey;
Console->hWindow = hWnd;
@@ -704,8 +704,8 @@
GuiConsoleUseDefaults(Console, GuiData, Console->ActiveBuffer);
if (Console->ProcessList.Flink != &Console->ProcessList)
{
- ProcessData = CONTAINING_RECORD(Console->ProcessList.Flink,
CSRSS_PROCESS_DATA, ProcessEntry);
- if (GuiConsoleOpenUserSettings(GuiData, PtrToUlong(ProcessData->ProcessId),
&hKey, KEY_READ, FALSE))
+ ProcessData = CONTAINING_RECORD(Console->ProcessList.Flink, CSR_PROCESS,
ListLink);
+ if (GuiConsoleOpenUserSettings(GuiData,
PtrToUlong(ProcessData->ClientId.UniqueProcess), &hKey, KEY_READ, FALSE))
{
GuiConsoleReadUserSettings(hKey, Console, GuiData,
Console->ActiveBuffer);
RegCloseKey(hKey);
@@ -1263,7 +1263,7 @@
PCSRSS_CONSOLE Console;
PGUI_CONSOLE_DATA GuiData;
PLIST_ENTRY current_entry;
- PCSRSS_PROCESS_DATA current;
+ PCSR_PROCESS current;
GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
@@ -1272,7 +1272,7 @@
current_entry = Console->ProcessList.Flink;
while (current_entry != &Console->ProcessList)
{
- current = CONTAINING_RECORD(current_entry, CSRSS_PROCESS_DATA, ProcessEntry);
+ current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ListLink);
current_entry = current_entry->Flink;
/* FIXME: Windows will wait up to 5 seconds for the thread to exit.
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/handle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/handle.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/handle.c [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -73,7 +73,7 @@
NTSTATUS
FASTCALL
Win32CsrReleaseObject(
- PCSRSS_PROCESS_DATA ProcessData,
+ PCSR_PROCESS ProcessData,
HANDLE Handle)
{
ULONG_PTR h = (ULONG_PTR)Handle >> 2;
@@ -93,7 +93,7 @@
NTSTATUS
FASTCALL
-Win32CsrLockObject(PCSRSS_PROCESS_DATA ProcessData,
+Win32CsrLockObject(PCSR_PROCESS ProcessData,
HANDLE Handle,
Object_t **Object,
DWORD Access,
@@ -135,7 +135,7 @@
NTSTATUS
WINAPI
Win32CsrReleaseConsole(
- PCSRSS_PROCESS_DATA ProcessData)
+ PCSR_PROCESS ProcessData)
{
PCSRSS_CONSOLE Console;
ULONG i;
@@ -154,7 +154,7 @@
{
ProcessData->Console = NULL;
EnterCriticalSection(&Console->Lock);
- RemoveEntryList(&ProcessData->ProcessEntry);
+ RemoveEntryList(&ProcessData->ListLink);
LeaveCriticalSection(&Console->Lock);
if (_InterlockedDecrement(&Console->ReferenceCount) == 0)
ConioDeleteConsole(&Console->Header);
@@ -170,7 +170,7 @@
NTSTATUS
FASTCALL
Win32CsrInsertObject(
- PCSRSS_PROCESS_DATA ProcessData,
+ PCSR_PROCESS ProcessData,
PHANDLE Handle,
Object_t *Object,
DWORD Access,
@@ -219,8 +219,8 @@
NTSTATUS
WINAPI
Win32CsrDuplicateHandleTable(
- PCSRSS_PROCESS_DATA SourceProcessData,
- PCSRSS_PROCESS_DATA TargetProcessData)
+ PCSR_PROCESS SourceProcessData,
+ PCSR_PROCESS TargetProcessData)
{
ULONG i;
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/harderror.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/harderror.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/harderror.c [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -503,7 +503,7 @@
BOOL
WINAPI
Win32CsrHardError(
- IN PCSRSS_PROCESS_DATA ProcessData,
+ IN PCSR_PROCESS ProcessData,
IN PHARDERROR_MSG Message)
{
ULONG_PTR Parameters[MAXIMUM_HARDERROR_PARAMETERS];
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/w32csr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/w32csr.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/w32csr.h [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -26,7 +26,7 @@
BOOL
WINAPI
Win32CsrHardError(
- IN PCSRSS_PROCESS_DATA ProcessData,
+ IN PCSR_PROCESS ProcessData,
IN PHARDERROR_MSG Message);
/* EOF */
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/win32csr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/win32csr.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/win32csr.h [iso-8859-1] Wed Feb 15
20:29:08 2012
@@ -40,30 +40,30 @@
} CSRSS_OBJECT_DEFINITION, *PCSRSS_OBJECT_DEFINITION;
/* handle.c */
-NTSTATUS FASTCALL Win32CsrInsertObject(PCSRSS_PROCESS_DATA ProcessData,
+NTSTATUS FASTCALL Win32CsrInsertObject(PCSR_PROCESS ProcessData,
PHANDLE Handle,
Object_t *Object,
DWORD Access,
BOOL Inheritable,
DWORD ShareMode);
-NTSTATUS FASTCALL Win32CsrLockObject(PCSRSS_PROCESS_DATA ProcessData,
+NTSTATUS FASTCALL Win32CsrLockObject(PCSR_PROCESS ProcessData,
HANDLE Handle,
Object_t **Object,
DWORD Access,
long Type);
VOID FASTCALL Win32CsrUnlockObject(Object_t *Object);
-NTSTATUS FASTCALL Win32CsrReleaseObject(PCSRSS_PROCESS_DATA ProcessData,
+NTSTATUS FASTCALL Win32CsrReleaseObject(PCSR_PROCESS ProcessData,
HANDLE Object);
-NTSTATUS WINAPI Win32CsrReleaseConsole(PCSRSS_PROCESS_DATA ProcessData);
-NTSTATUS WINAPI Win32CsrDuplicateHandleTable(PCSRSS_PROCESS_DATA SourceProcessData,
- PCSRSS_PROCESS_DATA TargetProcessData);
+NTSTATUS WINAPI Win32CsrReleaseConsole(PCSR_PROCESS ProcessData);
+NTSTATUS WINAPI Win32CsrDuplicateHandleTable(PCSR_PROCESS SourceProcessData,
+ PCSR_PROCESS TargetProcessData);
CSR_API(CsrGetHandle);
CSR_API(CsrCloseHandle);
CSR_API(CsrVerifyHandle);
CSR_API(CsrDuplicateHandle);
CSR_API(CsrGetInputWaitHandle);
-BOOL FASTCALL Win32CsrValidateBuffer(PCSRSS_PROCESS_DATA ProcessData,
+BOOL FASTCALL Win32CsrValidateBuffer(PCSR_PROCESS ProcessData,
PVOID Buffer,
SIZE_T NumElements,
SIZE_T ElementSize);