Author: hbelusca
Date: Thu Jan 24 22:41:33 2013
New Revision: 58213
URL:
http://svn.reactos.org/svn/reactos?rev=58213&view=rev
Log:
[CONSRV]
Rename functions to their new scheme: ConSrv* instead of Win32Csr* or Conio* (with some
exceptions for the latter case).
No code changes.
Modified:
branches/ros-csrss/win32ss/user/consrv/alias.c
branches/ros-csrss/win32ss/user/consrv/coninput.c
branches/ros-csrss/win32ss/user/consrv/conio.h
branches/ros-csrss/win32ss/user/consrv/conoutput.c
branches/ros-csrss/win32ss/user/consrv/console.c
branches/ros-csrss/win32ss/user/consrv/consrv.h
branches/ros-csrss/win32ss/user/consrv/guiconsole.c
branches/ros-csrss/win32ss/user/consrv/handle.c
branches/ros-csrss/win32ss/user/consrv/init.c
branches/ros-csrss/win32ss/user/consrv/lineinput.c
branches/ros-csrss/win32ss/user/consrv/tuiconsole.c
Modified: branches/ros-csrss/win32ss/user/consrv/alias.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/a…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/alias.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/alias.c [iso-8859-1] Thu Jan 24 22:41:33 2013
@@ -324,7 +324,7 @@
return STATUS_INVALID_PARAMETER;
}
- ApiMessage->Status =
ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
+ ApiMessage->Status =
ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
if (!NT_SUCCESS(ApiMessage->Status))
{
return ApiMessage->Status;
@@ -336,7 +336,7 @@
Header = IntCreateAliasHeader(lpExeName);
if (!Header)
{
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_INSUFFICIENT_RESOURCES;
}
IntInsertAliasHeader(&Console->Aliases, Header);
@@ -354,7 +354,7 @@
{
ApiMessage->Status = STATUS_INVALID_PARAMETER;
}
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return ApiMessage->Status;
}
@@ -362,12 +362,12 @@
if (!Entry)
{
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_INSUFFICIENT_RESOURCES;
}
IntInsertAliasEntry(Header, Entry);
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_SUCCESS;
}
@@ -411,7 +411,7 @@
return STATUS_INVALID_PARAMETER;
}
- ApiMessage->Status =
ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
+ ApiMessage->Status =
ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
if (!NT_SUCCESS(ApiMessage->Status))
{
return ApiMessage->Status;
@@ -420,27 +420,27 @@
Header = IntFindAliasHeader(Console->Aliases, lpExeName);
if (!Header)
{
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_INVALID_PARAMETER;
}
Entry = IntGetAliasEntry(Header, lpSource);
if (!Entry)
{
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_INVALID_PARAMETER;
}
Length = (wcslen(Entry->lpTarget) + 1) * sizeof(WCHAR);
if (Length > ConsoleAliasRequest->TargetLength)
{
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_BUFFER_TOO_SMALL;
}
wcscpy(lpTarget, Entry->lpTarget);
ConsoleAliasRequest->TargetLength = Length;
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_SUCCESS;
}
@@ -468,7 +468,7 @@
return STATUS_INVALID_PARAMETER;
}
- ApiMessage->Status =
ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
+ ApiMessage->Status =
ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
if (!NT_SUCCESS(ApiMessage->Status))
{
return ApiMessage->Status;
@@ -477,13 +477,13 @@
Header = IntFindAliasHeader(Console->Aliases, GetAllAliasesRequest->ExeName);
if (!Header)
{
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_INVALID_PARAMETER;
}
if (IntGetAllConsoleAliasesLength(Header) >
GetAllAliasesRequest->AliasesBufferLength)
{
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_BUFFER_OVERFLOW;
}
@@ -492,7 +492,7 @@
GetAllAliasesRequest->AliasesBufferLength);
GetAllAliasesRequest->AliasesBufferLength = BytesWritten;
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_SUCCESS;
}
@@ -516,7 +516,7 @@
return STATUS_INVALID_PARAMETER;
}
- ApiMessage->Status =
ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
+ ApiMessage->Status =
ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
if (!NT_SUCCESS(ApiMessage->Status))
{
return ApiMessage->Status;
@@ -525,13 +525,13 @@
Header = IntFindAliasHeader(Console->Aliases,
GetAllAliasesLengthRequest->ExeName);
if (!Header)
{
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_INVALID_PARAMETER;
}
Length = IntGetAllConsoleAliasesLength(Header);
GetAllAliasesLengthRequest->Length = Length;
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_SUCCESS;
}
@@ -552,7 +552,7 @@
return STATUS_INVALID_PARAMETER;
}
- ApiMessage->Status =
ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
+ ApiMessage->Status =
ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
if (!NT_SUCCESS(ApiMessage->Status))
{
return ApiMessage->Status;
@@ -562,13 +562,13 @@
if (ExesLength > GetAliasesExesRequest->Length)
{
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_BUFFER_OVERFLOW;
}
if (GetAliasesExesRequest->ExeNames == NULL)
{
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_INVALID_PARAMETER;
}
@@ -577,7 +577,7 @@
GetAliasesExesRequest->Length);
GetAliasesExesRequest->Length = BytesWritten;
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_SUCCESS;
}
@@ -587,11 +587,11 @@
PCONSOLE Console;
DPRINT("SrvGetConsoleAliasExesLength entered\n");
- ApiMessage->Status =
ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
+ ApiMessage->Status =
ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
if (NT_SUCCESS(ApiMessage->Status))
{
GetAliasesExesLengthRequest->Length =
IntGetConsoleAliasesExesLength(Console->Aliases);
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
}
return ApiMessage->Status;
}
Modified: branches/ros-csrss/win32ss/user/consrv/coninput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/coninput.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/coninput.c [iso-8859-1] Thu Jan 24 22:41:33
2013
@@ -256,7 +256,7 @@
{
current = CONTAINING_RECORD(current_entry, CONSOLE_PROCESS_DATA,
ConsoleLink);
current_entry = current_entry->Flink;
- ConioConsoleCtrlEvent(CTRL_C_EVENT, current);
+ ConSrvConsoleCtrlEvent(CTRL_C_EVENT, current);
}
if (Console->LineBuffer && !Console->LineComplete)
{
@@ -360,7 +360,7 @@
/*
* Somebody is closing a handle to this input buffer,
- * by calling Win32CsrCloseHandleEntry.
+ * by calling ConSrvCloseHandleEntry.
* See whether we are linked to that handle (ie. we
* are a waiter for this handle), and if so, return.
*/
@@ -491,7 +491,7 @@
/*
* Somebody is closing a handle to this input buffer,
- * by calling Win32CsrCloseHandleEntry.
+ * by calling ConSrvCloseHandleEntry.
* See whether we are linked to that handle (ie. we
* are a waiter for this handle), and if so, return.
*/
@@ -715,7 +715,7 @@
return STATUS_INVALID_PARAMETER;
}
- Status = ConioGetInputBufferAndHandleEntry(ProcessData,
ReadConsoleRequest->InputHandle, &InputBuffer, &HandleEntry, GENERIC_READ,
TRUE);
+ Status = ConSrvGetInputBufferAndHandleEntry(ProcessData,
ReadConsoleRequest->InputHandle, &InputBuffer, &HandleEntry, GENERIC_READ,
TRUE);
if (!NT_SUCCESS(Status)) return Status;
ReadConsoleRequest->NrCharactersRead = 0;
@@ -728,7 +728,7 @@
ApiMessage,
TRUE);
- ConioReleaseInputBuffer(InputBuffer, TRUE);
+ ConSrvReleaseInputBuffer(InputBuffer, TRUE);
if (Status == STATUS_PENDING)
*ReplyCode = CsrReplyPending;
@@ -757,7 +757,7 @@
GetInputRequest->InputsRead = 0;
- Status = ConioGetInputBufferAndHandleEntry(ProcessData,
GetInputRequest->InputHandle, &InputBuffer, &HandleEntry, GENERIC_READ, TRUE);
+ Status = ConSrvGetInputBufferAndHandleEntry(ProcessData,
GetInputRequest->InputHandle, &InputBuffer, &HandleEntry, GENERIC_READ, TRUE);
if(!NT_SUCCESS(Status)) return Status;
InputInfo.CallingThread = CsrGetClientThread();
@@ -769,7 +769,7 @@
ApiMessage,
TRUE);
- ConioReleaseInputBuffer(InputBuffer, TRUE);
+ ConSrvReleaseInputBuffer(InputBuffer, TRUE);
if (Status == STATUS_PENDING)
*ReplyCode = CsrReplyPending;
@@ -798,7 +798,7 @@
return STATUS_INVALID_PARAMETER;
}
- Status = ConioGetInputBuffer(ProcessData, WriteInputRequest->InputHandle,
&InputBuffer, GENERIC_WRITE, TRUE);
+ Status = ConSrvGetInputBuffer(ProcessData, WriteInputRequest->InputHandle,
&InputBuffer, GENERIC_WRITE, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Console = InputBuffer->Header.Console;
@@ -819,7 +819,7 @@
Status = ConioProcessChar(Console, InputRecord++);
}
- ConioReleaseInputBuffer(InputBuffer, TRUE);
+ ConSrvReleaseInputBuffer(InputBuffer, TRUE);
WriteInputRequest->Length = i;
@@ -836,7 +836,7 @@
DPRINT("SrvFlushConsoleInputBuffer\n");
- Status =
ConioGetInputBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
+ Status =
ConSrvGetInputBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
FlushInputBufferRequest->InputHandle,
&InputBuffer,
GENERIC_WRITE,
@@ -853,7 +853,7 @@
}
ResetEvent(InputBuffer->ActiveEvent);
- ConioReleaseInputBuffer(InputBuffer, TRUE);
+ ConSrvReleaseInputBuffer(InputBuffer, TRUE);
return STATUS_SUCCESS;
}
@@ -868,7 +868,7 @@
DPRINT("SrvGetConsoleNumberOfInputEvents\n");
- Status =
ConioGetInputBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
GetNumInputEventsRequest->InputHandle, &InputBuffer, GENERIC_READ, TRUE);
+ Status =
ConSrvGetInputBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
GetNumInputEventsRequest->InputHandle, &InputBuffer, GENERIC_READ, TRUE);
if (!NT_SUCCESS(Status)) return Status;
CurrentInput = InputBuffer->InputEvents.Flink;
@@ -881,7 +881,7 @@
NumEvents++;
}
- ConioReleaseInputBuffer(InputBuffer, TRUE);
+ ConSrvReleaseInputBuffer(InputBuffer, TRUE);
GetNumInputEventsRequest->NumInputEvents = NumEvents;
Modified: branches/ros-csrss/win32ss/user/consrv/conio.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/conio.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/conio.h [iso-8859-1] Thu Jan 24 22:41:33 2013
@@ -86,21 +86,21 @@
CONSOLE_SELECTION_INFO Selection;
+/******************************* Screen buffers *******************************/
+ LIST_ENTRY BufferList; /* List of all screen buffers for this
console */
+ PCONSOLE_SCREEN_BUFFER ActiveBuffer; /* Pointer to currently active screen buffer
*/
+ BYTE PauseFlags;
+ HANDLE UnpauseEvent;
+ LIST_ENTRY WriteWaitQueue; /* List head for the queue of write wait
blocks */
+
+ DWORD HardwareState; /* _GDI_MANAGED, _DIRECT */
+
/**************************** Aliases and Histories ***************************/
struct _ALIAS_HEADER *Aliases;
LIST_ENTRY HistoryBuffers;
UINT HistoryBufferSize; /* Size for newly created history buffers */
UINT NumberOfHistoryBuffers; /* Maximum number of history buffers allowed
*/
BOOLEAN HistoryNoDup; /* Remove old duplicate history entries */
-
-/******************************* Screen buffers *******************************/
- LIST_ENTRY BufferList; /* List of all screen buffers for this
console */
- PCONSOLE_SCREEN_BUFFER ActiveBuffer; /* Pointer to currently active screen buffer
*/
- BYTE PauseFlags;
- HANDLE UnpauseEvent;
- LIST_ENTRY WriteWaitQueue; /* List head for the queue of write wait
blocks */
-
- DWORD HardwareState; /* _GDI_MANAGED, _DIRECT */
/****************************** GUI-related data ******************************/
UNICODE_STRING Title; /* Title of console */
@@ -169,29 +169,25 @@
#define ConioResizeBuffer(Console, Buff, Size)
(Console)->Vtbl->ResizeBuffer((Console), (Buff), (Size))
/* console.c */
-#define ConioGetConsole(ProcessData, Console, LockConsole) \
- ConioConsoleFromProcessData((ProcessData), (Console), (LockConsole))
-#define ConioReleaseConsole(Console, ConsoleLocked) \
- Win32CsrUnlockConsole((Console), (ConsoleLocked))
-VOID WINAPI ConioDeleteConsole(PCONSOLE Console);
-VOID WINAPI CsrInitConsoleSupport(VOID);
-NTSTATUS WINAPI CsrInitConsole(PCONSOLE* NewConsole, int ShowCmd, PCSR_PROCESS
ConsoleLeaderProcess);
+VOID WINAPI ConSrvDeleteConsole(PCONSOLE Console);
+VOID WINAPI ConSrvInitConsoleSupport(VOID);
+NTSTATUS WINAPI ConSrvInitConsole(PCONSOLE* NewConsole, int ShowCmd, PCSR_PROCESS
ConsoleLeaderProcess);
VOID FASTCALL ConioPause(PCONSOLE Console, UINT Flags);
VOID FASTCALL ConioUnpause(PCONSOLE Console, UINT Flags);
-VOID FASTCALL ConioConsoleCtrlEvent(DWORD Event, PCONSOLE_PROCESS_DATA ProcessData);
-VOID FASTCALL ConioConsoleCtrlEventTimeout(DWORD Event,
- PCONSOLE_PROCESS_DATA ProcessData,
- DWORD Timeout);
+VOID FASTCALL ConSrvConsoleCtrlEvent(DWORD Event, PCONSOLE_PROCESS_DATA ProcessData);
+VOID FASTCALL ConSrvConsoleCtrlEventTimeout(DWORD Event,
+ PCONSOLE_PROCESS_DATA ProcessData,
+ DWORD Timeout);
/* coninput.c */
-#define ConioGetInputBuffer(ProcessData, Handle, Ptr, Access, LockConsole) \
- Win32CsrLockObject((ProcessData), (Handle), (Object_t **)(Ptr), NULL, \
- (Access), (LockConsole), CONIO_INPUT_BUFFER_MAGIC)
-#define ConioGetInputBufferAndHandleEntry(ProcessData, Handle, Ptr, Entry, Access,
LockConsole) \
- Win32CsrLockObject((ProcessData), (Handle), (Object_t **)(Ptr), (Entry),
\
- (Access), (LockConsole), CONIO_INPUT_BUFFER_MAGIC)
-#define ConioReleaseInputBuffer(Buff, IsConsoleLocked) \
- Win32CsrUnlockObject(&(Buff)->Header, (IsConsoleLocked))
+#define ConSrvGetInputBuffer(ProcessData, Handle, Ptr, Access, LockConsole) \
+ ConSrvGetObject((ProcessData), (Handle), (Object_t **)(Ptr), NULL, \
+ (Access), (LockConsole), CONIO_INPUT_BUFFER_MAGIC)
+#define ConSrvGetInputBufferAndHandleEntry(ProcessData, Handle, Ptr, Entry, Access,
LockConsole) \
+ ConSrvGetObject((ProcessData), (Handle), (Object_t **)(Ptr), (Entry),
\
+ (Access), (LockConsole), CONIO_INPUT_BUFFER_MAGIC)
+#define ConSrvReleaseInputBuffer(Buff, IsConsoleLocked) \
+ ConSrvReleaseObject(&(Buff)->Header, (IsConsoleLocked))
void WINAPI ConioProcessKey(MSG *msg, PCONSOLE Console, BOOL TextMode);
/* conoutput.c */
@@ -199,19 +195,19 @@
(((Rect)->Top) > ((Rect)->Bottom) ? 0 : ((Rect)->Bottom) -
((Rect)->Top) + 1)
#define ConioRectWidth(Rect) \
(((Rect)->Left) > ((Rect)->Right) ? 0 : ((Rect)->Right) -
((Rect)->Left) + 1)
-#define ConioGetScreenBuffer(ProcessData, Handle, Ptr, Access, LockConsole) \
- Win32CsrLockObject((ProcessData), (Handle), (Object_t **)(Ptr), NULL, \
- (Access), (LockConsole), CONIO_SCREEN_BUFFER_MAGIC)
-#define ConioGetScreenBufferAndHandleEntry(ProcessData, Handle, Ptr, Entry, Access,
LockConsole) \
- Win32CsrLockObject((ProcessData), (Handle), (Object_t **)(Ptr), (Entry),
\
- (Access), (LockConsole), CONIO_SCREEN_BUFFER_MAGIC)
-#define ConioReleaseScreenBuffer(Buff, IsConsoleLocked) \
- Win32CsrUnlockObject(&(Buff)->Header, (IsConsoleLocked))
+#define ConSrvGetScreenBuffer(ProcessData, Handle, Ptr, Access, LockConsole) \
+ ConSrvGetObject((ProcessData), (Handle), (Object_t **)(Ptr), NULL, \
+ (Access), (LockConsole), CONIO_SCREEN_BUFFER_MAGIC)
+#define ConSrvGetScreenBufferAndHandleEntry(ProcessData, Handle, Ptr, Entry, Access,
LockConsole) \
+ ConSrvGetObject((ProcessData), (Handle), (Object_t **)(Ptr), (Entry),
\
+ (Access), (LockConsole), CONIO_SCREEN_BUFFER_MAGIC)
+#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked) \
+ ConSrvReleaseObject(&(Buff)->Header, (IsConsoleLocked))
PBYTE FASTCALL ConioCoordToPointer(PCONSOLE_SCREEN_BUFFER Buf, ULONG X, ULONG Y);
VOID FASTCALL ConioDrawConsole(PCONSOLE Console);
NTSTATUS FASTCALL ConioWriteConsole(PCONSOLE Console, PCONSOLE_SCREEN_BUFFER Buff,
CHAR *Buffer, DWORD Length, BOOL Attrib);
-NTSTATUS FASTCALL CsrInitConsoleScreenBuffer(PCONSOLE Console, PCONSOLE_SCREEN_BUFFER
Buffer);
+NTSTATUS FASTCALL ConSrvInitConsoleScreenBuffer(PCONSOLE Console, PCONSOLE_SCREEN_BUFFER
Buffer);
VOID WINAPI ConioDeleteScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer);
DWORD FASTCALL ConioEffectiveCursorSize(PCONSOLE Console, DWORD Scale);
Modified: branches/ros-csrss/win32ss/user/consrv/conoutput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/conoutput.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/conoutput.c [iso-8859-1] Thu Jan 24 22:41:33
2013
@@ -58,10 +58,10 @@
}
NTSTATUS FASTCALL
-CsrInitConsoleScreenBuffer(PCONSOLE Console,
+ConSrvInitConsoleScreenBuffer(PCONSOLE Console,
PCONSOLE_SCREEN_BUFFER Buffer)
{
- DPRINT("CsrInitConsoleScreenBuffer Size X %d Size Y %d\n", Buffer->MaxX,
Buffer->MaxY);
+ DPRINT("ConSrvInitConsoleScreenBuffer Size X %d Size Y %d\n",
Buffer->MaxX, Buffer->MaxY);
Buffer->Header.Type = CONIO_SCREEN_BUFFER_MAGIC;
Buffer->Header.Console = Console;
@@ -486,7 +486,7 @@
DWORD Written = 0;
ULONG Length;
- Status = ConioGetScreenBuffer(ConsoleGetPerProcessData(ClientThread->Process),
WriteConsoleRequest->OutputHandle, &Buff, GENERIC_WRITE, FALSE);
+ Status = ConSrvGetScreenBuffer(ConsoleGetPerProcessData(ClientThread->Process),
WriteConsoleRequest->OutputHandle, &Buff, GENERIC_WRITE, FALSE);
if (!NT_SUCCESS(Status)) return Status;
Console = Buff->Header.Console;
@@ -504,7 +504,7 @@
NULL))
{
/* Fail */
- ConioReleaseScreenBuffer(Buff, FALSE);
+ ConSrvReleaseScreenBuffer(Buff, FALSE);
return STATUS_NO_MEMORY;
}
}
@@ -558,7 +558,7 @@
WriteConsoleRequest->NrCharactersWritten = Written;
}
- ConioReleaseScreenBuffer(Buff, FALSE);
+ ConSrvReleaseScreenBuffer(Buff, FALSE);
return Status;
}
@@ -598,7 +598,7 @@
return STATUS_INVALID_PARAMETER;
}
- Status = ConioGetScreenBuffer(ProcessData, ReadOutputRequest->OutputHandle,
&Buff, GENERIC_READ, TRUE);
+ Status = ConSrvGetScreenBuffer(ProcessData, ReadOutputRequest->OutputHandle,
&Buff, GENERIC_READ, TRUE);
if (!NT_SUCCESS(Status)) return Status;
/* FIXME: Is this correct? */
@@ -612,7 +612,7 @@
ConioInitRect(&ScreenRect, 0, 0, Buff->MaxY, Buff->MaxX);
if (!ConioGetIntersection(&ReadRegion, &ScreenRect, &ReadRegion))
{
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_SUCCESS;
}
@@ -639,7 +639,7 @@
}
}
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
ReadOutputRequest->ReadRegion.Right = ReadRegion.Left + SizeX - 1;
ReadOutputRequest->ReadRegion.Bottom = ReadRegion.Top + SizeY - 1;
@@ -704,7 +704,7 @@
return STATUS_INVALID_PARAMETER;
}
- Status = ConioGetScreenBuffer(ProcessData,
+ Status = ConSrvGetScreenBuffer(ProcessData,
WriteOutputRequest->OutputHandle,
&Buff,
GENERIC_WRITE,
@@ -724,7 +724,7 @@
ConioInitRect(&ScreenBuffer, 0, 0, Buff->MaxY - 1, Buff->MaxX - 1);
if (!ConioGetIntersection(&WriteRegion, &ScreenBuffer, &WriteRegion))
{
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
/* It is okay to have a WriteRegion completely outside the screen buffer.
No data is written then. */
@@ -754,7 +754,7 @@
ConioDrawRegion(Console, &WriteRegion);
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
WriteOutputRequest->WriteRegion.Right = WriteRegion.Left + SizeX - 1;
WriteOutputRequest->WriteRegion.Bottom = WriteRegion.Top + SizeY - 1;
@@ -806,7 +806,7 @@
return STATUS_INVALID_PARAMETER;
}
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
ReadOutputCodeRequest->OutputHandle, &Buff, GENERIC_READ, TRUE);
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
ReadOutputCodeRequest->OutputHandle, &Buff, GENERIC_READ, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Console = Buff->Header.Console;
@@ -880,7 +880,7 @@
ReadOutputCodeRequest->EndCoord.X = Xpos;
ReadOutputCodeRequest->EndCoord.Y = (Ypos - Buff->VirtualY + Buff->MaxY) %
Buff->MaxY;
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
ReadOutputCodeRequest->CodesRead = (DWORD)((ULONG_PTR)ReadBuffer -
(ULONG_PTR)ReadOutputCodeRequest->pCode.pCode) / CodeSize;
// <= ReadOutputCodeRequest->NumCodesToRead
@@ -930,7 +930,7 @@
return STATUS_INVALID_PARAMETER;
}
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
WriteOutputCodeRequest->OutputHandle,
&Buff,
GENERIC_WRITE,
@@ -1015,7 +1015,7 @@
RtlFreeHeap(RtlGetProcessHeap(), 0, tmpString);
}
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
// WriteOutputCodeRequest->NrCharactersWritten = Written;
return Status;
@@ -1035,7 +1035,7 @@
DPRINT("SrvFillConsoleOutput\n");
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
FillOutputRequest->OutputHandle, &Buff, GENERIC_WRITE, TRUE);
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
FillOutputRequest->OutputHandle, &Buff, GENERIC_WRITE, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Console = Buff->Header.Console;
@@ -1062,7 +1062,7 @@
break;
default:
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_INVALID_PARAMETER;
}
@@ -1089,7 +1089,7 @@
ConioDrawRegion(Console, &UpdateRect);
}
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
/*
Length = FillOutputRequest->Length;
FillOutputRequest->NrCharactersWritten = Length;
@@ -1105,12 +1105,12 @@
DPRINT("SrvGetConsoleCursorInfo\n");
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
CursorInfoRequest->OutputHandle, &Buff, GENERIC_READ, TRUE);
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
CursorInfoRequest->OutputHandle, &Buff, GENERIC_READ, TRUE);
if (!NT_SUCCESS(Status)) return Status;
CursorInfoRequest->Info.bVisible = Buff->CursorInfo.bVisible;
CursorInfoRequest->Info.dwSize = Buff->CursorInfo.dwSize;
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_SUCCESS;
}
@@ -1126,7 +1126,7 @@
DPRINT("SrvSetConsoleCursorInfo\n");
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
CursorInfoRequest->OutputHandle, &Buff, GENERIC_WRITE, TRUE);
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
CursorInfoRequest->OutputHandle, &Buff, GENERIC_WRITE, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Console = Buff->Header.Console;
@@ -1151,12 +1151,12 @@
if (!ConioSetCursorInfo(Console, Buff))
{
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_UNSUCCESSFUL;
}
}
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_SUCCESS;
}
@@ -1172,7 +1172,7 @@
DPRINT("SrvSetConsoleCursorPosition\n");
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
SetCursorPositionRequest->OutputHandle, &Buff, GENERIC_WRITE, TRUE);
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
SetCursorPositionRequest->OutputHandle, &Buff, GENERIC_WRITE, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Console = Buff->Header.Console;
@@ -1182,7 +1182,7 @@
if ( NewCursorX < 0 || NewCursorX >= Buff->MaxX ||
NewCursorY < 0 || NewCursorY >= Buff->MaxY )
{
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_INVALID_PARAMETER;
}
OldCursorX = Buff->CurrentX;
@@ -1193,12 +1193,12 @@
{
if (!ConioSetScreenInfo(Console, Buff, OldCursorX, OldCursorY))
{
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_UNSUCCESSFUL;
}
}
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_SUCCESS;
}
@@ -1212,7 +1212,7 @@
DPRINT("SrvSetConsoleTextAttribute\n");
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
SetTextAttribRequest->OutputHandle, &Buff, GENERIC_WRITE, TRUE);
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
SetTextAttribRequest->OutputHandle, &Buff, GENERIC_WRITE, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Console = Buff->Header.Console;
@@ -1222,12 +1222,12 @@
{
if (!ConioUpdateScreenInfo(Console, Buff))
{
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_UNSUCCESSFUL;
}
}
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_SUCCESS;
}
@@ -1244,7 +1244,7 @@
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
- Status = ConioGetConsole(ProcessData, &Console, TRUE);
+ Status = ConSrvGetConsole(ProcessData, &Console, TRUE);
if (!NT_SUCCESS(Status))
{
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
@@ -1277,10 +1277,10 @@
Buff->MaxY = 25;
}
- Status = CsrInitConsoleScreenBuffer(Console, Buff);
+ Status = ConSrvInitConsoleScreenBuffer(Console, Buff);
if (NT_SUCCESS(Status))
{
- Status = Win32CsrInsertObject(ProcessData,
+ Status = ConSrvInsertObject(ProcessData,
&CreateScreenBufferRequest->OutputHandle,
&Buff->Header,
CreateScreenBufferRequest->Access,
@@ -1293,7 +1293,7 @@
Status = STATUS_INSUFFICIENT_RESOURCES;
}
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
@@ -1310,7 +1310,7 @@
DPRINT("SrvGetConsoleScreenBufferInfo\n");
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
ScreenBufferInfoRequest->OutputHandle, &Buff, GENERIC_READ, TRUE);
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
ScreenBufferInfoRequest->OutputHandle, &Buff, GENERIC_READ, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Console = Buff->Header.Console;
@@ -1327,7 +1327,7 @@
pInfo->dwMaximumWindowSize.X = Buff->MaxX;
pInfo->dwMaximumWindowSize.Y = Buff->MaxY;
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_SUCCESS;
}
@@ -1341,14 +1341,14 @@
DPRINT("SrvSetConsoleActiveScreenBuffer\n");
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
SetScreenBufferRequest->OutputHandle, &Buff, GENERIC_WRITE, TRUE);
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
SetScreenBufferRequest->OutputHandle, &Buff, GENERIC_WRITE, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Console = Buff->Header.Console;
if (Buff == Console->ActiveBuffer)
{
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_SUCCESS;
}
@@ -1364,7 +1364,7 @@
/* Redraw the console */
ConioDrawConsole(Console);
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_SUCCESS;
}
@@ -1394,7 +1394,7 @@
DestinationOrigin = ScrollScreenBufferRequest->DestinationOrigin;
Fill = ScrollScreenBufferRequest->Fill;
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
OutputHandle, &Buff, GENERIC_WRITE, TRUE);
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
OutputHandle, &Buff, GENERIC_WRITE, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Console = Buff->Header.Console;
@@ -1405,7 +1405,7 @@
ConioInitRect(&ScreenBuffer, 0, 0, Buff->MaxY - 1, Buff->MaxX - 1);
if (!ConioGetIntersection(&SrcRegion, &ScreenBuffer, &ScrollRectangle))
{
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_SUCCESS;
}
@@ -1424,7 +1424,7 @@
ClipRectangle = ScrollScreenBufferRequest->ClipRectangle;
if (!ConioGetIntersection(&ClipRectangle, &ClipRectangle,
&ScreenBuffer))
{
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_SUCCESS;
}
}
@@ -1456,7 +1456,7 @@
}
}
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_SUCCESS;
}
@@ -1467,11 +1467,11 @@
PCONSOLE_SETSCREENBUFFERSIZE SetScreenBufferSizeRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetScreenBufferSizeRequest;
PCONSOLE_SCREEN_BUFFER Buff;
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
SetScreenBufferSizeRequest->OutputHandle, &Buff, GENERIC_WRITE, TRUE);
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
SetScreenBufferSizeRequest->OutputHandle, &Buff, GENERIC_WRITE, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Status = ConioResizeBuffer(Buff->Header.Console, Buff,
SetScreenBufferSizeRequest->Size);
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return Status;
}
Modified: branches/ros-csrss/win32ss/user/consrv/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/console.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/console.c [iso-8859-1] Thu Jan 24 22:41:33
2013
@@ -32,13 +32,13 @@
}
VOID FASTCALL
-ConioConsoleCtrlEventTimeout(DWORD Event,
- PCONSOLE_PROCESS_DATA ProcessData,
- DWORD Timeout)
+ConSrvConsoleCtrlEventTimeout(DWORD Event,
+ PCONSOLE_PROCESS_DATA ProcessData,
+ DWORD Timeout)
{
HANDLE Thread;
- DPRINT("ConioConsoleCtrlEvent Parent ProcessId = %x\n",
ProcessData->Process->ClientId.UniqueProcess);
+ DPRINT("ConSrvConsoleCtrlEvent Parent ProcessId = %x\n",
ProcessData->Process->ClientId.UniqueProcess);
if (ProcessData->CtrlDispatcher)
{
@@ -58,13 +58,40 @@
}
VOID FASTCALL
-ConioConsoleCtrlEvent(DWORD Event, PCONSOLE_PROCESS_DATA ProcessData)
-{
- ConioConsoleCtrlEventTimeout(Event, ProcessData, 0);
+ConSrvConsoleCtrlEvent(DWORD Event, PCONSOLE_PROCESS_DATA ProcessData)
+{
+ ConSrvConsoleCtrlEventTimeout(Event, ProcessData, 0);
+}
+
+VOID FASTCALL
+ConioPause(PCONSOLE Console, UINT Flags)
+{
+ Console->PauseFlags |= Flags;
+ if (!Console->UnpauseEvent)
+ Console->UnpauseEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+}
+
+VOID FASTCALL
+ConioUnpause(PCONSOLE Console, UINT Flags)
+{
+ Console->PauseFlags &= ~Flags;
+
+ // if ((Console->PauseFlags & (PAUSED_FROM_KEYBOARD | PAUSED_FROM_SCROLLBAR |
PAUSED_FROM_SELECTION)) == 0)
+ if (Console->PauseFlags == 0 && Console->UnpauseEvent)
+ {
+ SetEvent(Console->UnpauseEvent);
+ CloseHandle(Console->UnpauseEvent);
+ Console->UnpauseEvent = NULL;
+
+ CsrNotifyWait(&Console->WriteWaitQueue,
+ WaitAll,
+ NULL,
+ NULL);
+ }
}
NTSTATUS WINAPI
-CsrInitConsole(PCONSOLE* NewConsole, int ShowCmd, PCSR_PROCESS ConsoleLeaderProcess)
+ConSrvInitConsole(PCONSOLE* NewConsole, int ShowCmd, PCSR_PROCESS ConsoleLeaderProcess)
{
NTSTATUS Status;
SECURITY_ATTRIBUTES SecurityAttributes;
@@ -190,7 +217,7 @@
}
}
- Status = CsrInitConsoleScreenBuffer(Console, NewBuffer);
+ Status = ConSrvInitConsoleScreenBuffer(Console, NewBuffer);
if (!NT_SUCCESS(Status))
{
ConioCleanupConsole(Console);
@@ -198,7 +225,7 @@
DeleteCriticalSection(&Console->Lock);
CloseHandle(Console->InputBuffer.ActiveEvent);
RtlFreeHeap(ConSrvHeap, 0, NewBuffer);
- DPRINT1("CsrInitConsoleScreenBuffer: failed\n");
+ DPRINT1("ConSrvInitConsoleScreenBuffer: failed\n");
RtlFreeHeap(ConSrvHeap, 0, Console);
return Status;
}
@@ -209,6 +236,50 @@
*NewConsole = Console;
return STATUS_SUCCESS;
+}
+
+VOID WINAPI
+ConSrvInitConsoleSupport(VOID)
+{
+ DPRINT("CONSRV: ConSrvInitConsoleSupport()\n");
+
+ /* Should call LoadKeyboardLayout */
+}
+
+VOID WINAPI
+ConSrvDeleteConsole(PCONSOLE Console)
+{
+ ConsoleInput *Event;
+
+ DPRINT("ConSrvDeleteConsole\n");
+
+ /* Drain input event queue */
+ while (Console->InputBuffer.InputEvents.Flink !=
&Console->InputBuffer.InputEvents)
+ {
+ Event = (ConsoleInput *) Console->InputBuffer.InputEvents.Flink;
+ Console->InputBuffer.InputEvents.Flink =
Console->InputBuffer.InputEvents.Flink->Flink;
+ Console->InputBuffer.InputEvents.Flink->Flink->Blink =
&Console->InputBuffer.InputEvents;
+ RtlFreeHeap(ConSrvHeap, 0, Event);
+ }
+
+ ConioCleanupConsole(Console);
+ if (Console->LineBuffer)
+ RtlFreeHeap(ConSrvHeap, 0, Console->LineBuffer);
+ while (!IsListEmpty(&Console->HistoryBuffers))
+ HistoryDeleteBuffer((struct _HISTORY_BUFFER *)Console->HistoryBuffers.Flink);
+
+ ConioDeleteScreenBuffer(Console->ActiveBuffer);
+ if (!IsListEmpty(&Console->BufferList))
+ {
+ DPRINT1("BUG: screen buffer list not empty\n");
+ }
+
+ CloseHandle(Console->InputBuffer.ActiveEvent);
+ if (Console->UnpauseEvent) CloseHandle(Console->UnpauseEvent);
+ DeleteCriticalSection(&Console->Lock);
+ RtlFreeUnicodeString(&Console->Title);
+ IntDeleteAllAliases(Console->Aliases);
+ RtlFreeHeap(ConSrvHeap, 0, Console);
}
CSR_API(SrvOpenConsole)
@@ -257,7 +328,7 @@
}
else
{
- Status = Win32CsrInsertObject(ProcessData,
+ Status = ConSrvInsertObject(ProcessData,
&OpenConsoleRequest->ConsoleHandle,
Object,
DesiredAccess,
@@ -289,11 +360,11 @@
}
/******************************************************************************/
-/** This comes from ConsoleConnect!! **/
+/** This comes from ConSrvConnect!! **/
DPRINT1("SrvAllocConsole - Checkpoint 1\n");
/*
- * We are about to create a new console. However when ConsoleNewProcess
+ * We are about to create a new console. However when ConSrvNewProcess
* was called, we didn't know that we wanted to create a new console and
* therefore, we by default inherited the handles table from our parent
* process. It's only now that we notice that in fact we do not need
@@ -302,11 +373,11 @@
* Therefore, free the console we can have and our handles table,
* and recreate a new one later on.
*/
- Win32CsrReleaseConsole(ProcessData);
- // Win32CsrFreeHandlesTable(ProcessData);
+ ConSrvRemoveConsole(ProcessData);
+ // ConSrvFreeHandlesTable(ProcessData);
/* Initialize a new Console owned by the Console Leader Process */
- Status = Win32CsrAllocateConsole(ProcessData,
+ Status = ConSrvAllocateConsole(ProcessData,
&AllocConsoleRequest->InputHandle,
&AllocConsoleRequest->OutputHandle,
&AllocConsoleRequest->ErrorHandle,
@@ -333,7 +404,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("NtDuplicateObject() failed: %lu\n", Status);
- Win32CsrReleaseConsole(ProcessData);
+ ConSrvRemoveConsole(ProcessData);
return Status;
}
@@ -400,11 +471,11 @@
DPRINT1("AttachConsole OK\n");
/******************************************************************************/
-/** This comes from ConsoleNewProcess!! **/
+/** This comes from ConSrvNewProcess!! **/
SourceProcessData = ConsoleGetPerProcessData(SourceProcess);
/*
- * We are about to create a new console. However when ConsoleNewProcess
+ * We are about to create a new console. However when ConSrvNewProcess
* was called, we didn't know that we wanted to create a new console and
* therefore, we by default inherited the handles table from our parent
* process. It's only now that we notice that in fact we do not need
@@ -413,8 +484,8 @@
* Therefore, free the console we can have and our handles table,
* and recreate a new one later on.
*/
- Win32CsrReleaseConsole(TargetProcessData);
- // Win32CsrFreeHandlesTable(TargetProcessData);
+ ConSrvRemoveConsole(TargetProcessData);
+ // ConSrvFreeHandlesTable(TargetProcessData);
/*
* Inherit the console from the parent,
@@ -428,9 +499,9 @@
}
TargetProcessData->Console = SourceProcessData->Console;
- /// REMARK: This code comes from Win32CsrAllocateConsole.
+ /// REMARK: This code comes from ConSrvAllocateConsole.
/* Initialize the handles table */
- Status = Win32CsrInitHandlesTable(TargetProcessData,
+ Status = ConSrvInitHandlesTable(TargetProcessData,
&AttachConsoleRequest->InputHandle,
&AttachConsoleRequest->OutputHandle,
&AttachConsoleRequest->ErrorHandle);
@@ -438,7 +509,7 @@
{
DPRINT1("Failed to initialize the handles table\n");
- // Win32CsrReleaseConsole(TargetProcessData);
+ // ConSrvRemoveConsole(TargetProcessData);
TargetProcessData->Console = NULL;
goto Quit;
}
@@ -446,7 +517,7 @@
/******************************************************************************/
/******************************************************************************/
-/** This comes from ConsoleConnect / SrvAllocConsole!! **/
+/** This comes from ConSrvConnect / SrvAllocConsole!! **/
/* Add a reference count because the process is tied to the console */
_InterlockedIncrement(&TargetProcessData->Console->ReferenceCount);
@@ -467,7 +538,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("NtDuplicateObject() failed: %lu\n", Status);
- Win32CsrReleaseConsole(TargetProcessData);
+ ConSrvRemoveConsole(TargetProcessData);
goto Quit;
}
@@ -496,79 +567,8 @@
CSR_API(SrvFreeConsole)
{
DPRINT1("SrvFreeConsole\n");
- Win32CsrReleaseConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process));
+ ConSrvRemoveConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process));
return STATUS_SUCCESS;
-}
-
-VOID WINAPI
-ConioDeleteConsole(PCONSOLE Console)
-{
- ConsoleInput *Event;
-
- DPRINT("ConioDeleteConsole\n");
-
- /* Drain input event queue */
- while (Console->InputBuffer.InputEvents.Flink !=
&Console->InputBuffer.InputEvents)
- {
- Event = (ConsoleInput *) Console->InputBuffer.InputEvents.Flink;
- Console->InputBuffer.InputEvents.Flink =
Console->InputBuffer.InputEvents.Flink->Flink;
- Console->InputBuffer.InputEvents.Flink->Flink->Blink =
&Console->InputBuffer.InputEvents;
- RtlFreeHeap(ConSrvHeap, 0, Event);
- }
-
- ConioCleanupConsole(Console);
- if (Console->LineBuffer)
- RtlFreeHeap(ConSrvHeap, 0, Console->LineBuffer);
- while (!IsListEmpty(&Console->HistoryBuffers))
- HistoryDeleteBuffer((struct _HISTORY_BUFFER *)Console->HistoryBuffers.Flink);
-
- ConioDeleteScreenBuffer(Console->ActiveBuffer);
- if (!IsListEmpty(&Console->BufferList))
- {
- DPRINT1("BUG: screen buffer list not empty\n");
- }
-
- CloseHandle(Console->InputBuffer.ActiveEvent);
- if (Console->UnpauseEvent) CloseHandle(Console->UnpauseEvent);
- DeleteCriticalSection(&Console->Lock);
- RtlFreeUnicodeString(&Console->Title);
- IntDeleteAllAliases(Console->Aliases);
- RtlFreeHeap(ConSrvHeap, 0, Console);
-}
-
-VOID WINAPI
-CsrInitConsoleSupport(VOID)
-{
- DPRINT("CSR: CsrInitConsoleSupport()\n");
-
- /* Should call LoadKeyboardLayout */
-}
-
-VOID FASTCALL
-ConioPause(PCONSOLE Console, UINT Flags)
-{
- Console->PauseFlags |= Flags;
- if (!Console->UnpauseEvent)
- Console->UnpauseEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
-}
-
-VOID FASTCALL
-ConioUnpause(PCONSOLE Console, UINT Flags)
-{
- Console->PauseFlags &= ~Flags;
-
- // if ((Console->PauseFlags & (PAUSED_FROM_KEYBOARD | PAUSED_FROM_SCROLLBAR |
PAUSED_FROM_SELECTION)) == 0)
- if (Console->PauseFlags == 0 && Console->UnpauseEvent)
- {
- SetEvent(Console->UnpauseEvent);
- CloseHandle(Console->UnpauseEvent);
- Console->UnpauseEvent = NULL;
-
- CsrNotifyWait(&Console->WriteWaitQueue,
- WaitAll,
- NULL,
- NULL);
- }
}
CSR_API(SrvSetConsoleMode)
@@ -579,7 +579,7 @@
DPRINT("SrvSetConsoleMode\n");
- Status =
Win32CsrLockObject(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
+ Status = ConSrvGetObject(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
ConsoleModeRequest->ConsoleHandle,
&Object, NULL, GENERIC_WRITE, TRUE, 0);
if (!NT_SUCCESS(Status)) return Status;
@@ -601,7 +601,7 @@
Status = STATUS_INVALID_HANDLE;
}
- Win32CsrUnlockObject(Object, TRUE);
+ ConSrvReleaseObject(Object, TRUE);
return Status;
}
@@ -614,7 +614,7 @@
DPRINT("SrvGetConsoleMode\n");
- Status =
Win32CsrLockObject(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
+ Status = ConSrvGetObject(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
ConsoleModeRequest->ConsoleHandle,
&Object, NULL, GENERIC_READ, TRUE, 0);
if (!NT_SUCCESS(Status)) return Status;
@@ -636,7 +636,7 @@
Status = STATUS_INVALID_HANDLE;
}
- Win32CsrUnlockObject(Object, TRUE);
+ ConSrvReleaseObject(Object, TRUE);
return Status;
}
@@ -659,7 +659,7 @@
return STATUS_INVALID_PARAMETER;
}
- Status = ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
+ Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if(NT_SUCCESS(Status))
{
Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, TitleRequest->Length);
@@ -685,7 +685,7 @@
Status = STATUS_NO_MEMORY;
}
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
}
return Status;
@@ -709,7 +709,7 @@
return STATUS_INVALID_PARAMETER;
}
- Status = ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
+ Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status))
{
DPRINT1("Can't get console\n");
@@ -726,7 +726,7 @@
TitleRequest->Length = Console->Title.Length;
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_SUCCESS;
}
@@ -774,7 +774,7 @@
DPRINT("SrvGetConsoleHardwareState\n");
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
HardwareStateRequest->OutputHandle,
&Buff,
GENERIC_READ,
@@ -788,7 +788,7 @@
Console = Buff->Header.Console;
HardwareStateRequest->State = Console->HardwareState;
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return Status;
}
@@ -802,7 +802,7 @@
DPRINT("SrvSetConsoleHardwareState\n");
- Status =
ConioGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
+ Status =
ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
HardwareStateRequest->OutputHandle,
&Buff,
GENERIC_READ,
@@ -817,7 +817,7 @@
Console = Buff->Header.Console;
Status = SetConsoleHardwareState(Console, HardwareStateRequest->State);
- ConioReleaseScreenBuffer(Buff, TRUE);
+ ConSrvReleaseScreenBuffer(Buff, TRUE);
return Status;
}
@@ -830,11 +830,11 @@
DPRINT("SrvGetConsoleWindow\n");
- Status = ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
+ Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
GetWindowRequest->WindowHandle = Console->hWindow;
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_SUCCESS;
}
@@ -847,14 +847,14 @@
DPRINT("SrvSetConsoleIcon\n");
- Status = ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
+ Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Status = (ConioChangeIcon(Console, SetIconRequest->WindowIcon)
? STATUS_SUCCESS
: STATUS_UNSUCCESSFUL);
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return Status;
}
@@ -868,12 +868,12 @@
DPRINT("SrvGetConsoleCP, getting %s Code Page\n",
ConsoleCPRequest->InputCP ? "Input" : "Output");
- Status = ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
+ Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
ConsoleCPRequest->CodePage = (ConsoleCPRequest->InputCP ? Console->CodePage
:
Console->OutputCodePage);
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_SUCCESS;
}
@@ -886,7 +886,7 @@
DPRINT("SrvSetConsoleCP, setting %s Code Page\n",
ConsoleCPRequest->InputCP ? "Input" : "Output");
- Status = ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
+ Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
if (IsValidCodePage(ConsoleCPRequest->CodePage))
@@ -896,11 +896,11 @@
else
Console->OutputCodePage = ConsoleCPRequest->CodePage;
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_SUCCESS;
}
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return STATUS_INVALID_PARAMETER;
}
@@ -927,7 +927,7 @@
Buffer = GetProcessListRequest->pProcessIds;
- Status = ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
+ Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
for (current_entry = Console->ProcessList.Flink;
@@ -941,7 +941,7 @@
}
}
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
GetProcessListRequest->nProcessIdsTotal = nItems;
return STATUS_SUCCESS;
@@ -956,7 +956,7 @@
PLIST_ENTRY current_entry;
DWORD Group;
- Status = ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
+ Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Group = GenerateCtrlEventRequest->ProcessGroup;
@@ -968,12 +968,12 @@
current = CONTAINING_RECORD(current_entry, CONSOLE_PROCESS_DATA, ConsoleLink);
if (Group == 0 || current->Process->ProcessGroupId == Group)
{
- ConioConsoleCtrlEvent(GenerateCtrlEventRequest->Event, current);
+ ConSrvConsoleCtrlEvent(GenerateCtrlEventRequest->Event, current);
Status = STATUS_SUCCESS;
}
}
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
return Status;
}
@@ -984,13 +984,13 @@
PCONSOLE_GETSELECTIONINFO GetSelectionInfoRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetSelectionInfoRequest;
PCONSOLE Console;
- Status = ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
+ Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (NT_SUCCESS(Status))
{
memset(&GetSelectionInfoRequest->Info, 0,
sizeof(CONSOLE_SELECTION_INFO));
if (Console->Selection.dwFlags != 0)
GetSelectionInfoRequest->Info = Console->Selection;
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
}
return Status;
Modified: branches/ros-csrss/win32ss/user/consrv/consrv.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/consrv.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/consrv.h [iso-8859-1] Thu Jan 24 22:41:33 2013
@@ -140,50 +140,49 @@
CSR_API(SrvDuplicateHandle);
/// CSR_API(CsrGetInputWaitHandle);
-NTSTATUS FASTCALL Win32CsrInitHandlesTable(IN OUT PCONSOLE_PROCESS_DATA ProcessData,
- OUT PHANDLE pInputHandle,
- OUT PHANDLE pOutputHandle,
- OUT PHANDLE pErrorHandle);
-NTSTATUS FASTCALL Win32CsrInheritHandlesTable(IN PCONSOLE_PROCESS_DATA
SourceProcessData,
- IN PCONSOLE_PROCESS_DATA
TargetProcessData);
-VOID FASTCALL Win32CsrFreeHandlesTable(PCONSOLE_PROCESS_DATA ProcessData);
-NTSTATUS FASTCALL Win32CsrInsertObject(PCONSOLE_PROCESS_DATA ProcessData,
- PHANDLE Handle,
- Object_t *Object,
- DWORD Access,
- BOOL Inheritable,
- DWORD ShareMode);
-NTSTATUS FASTCALL Win32CsrLockObject(PCONSOLE_PROCESS_DATA ProcessData,
- HANDLE Handle,
- Object_t** Object,
- PCONSOLE_IO_HANDLE* Entry OPTIONAL,
+NTSTATUS FASTCALL ConSrvInitHandlesTable(IN OUT PCONSOLE_PROCESS_DATA ProcessData,
+ OUT PHANDLE pInputHandle,
+ OUT PHANDLE pOutputHandle,
+ OUT PHANDLE pErrorHandle);
+NTSTATUS FASTCALL ConSrvInheritHandlesTable(IN PCONSOLE_PROCESS_DATA SourceProcessData,
+ IN PCONSOLE_PROCESS_DATA TargetProcessData);
+VOID FASTCALL ConSrvFreeHandlesTable(PCONSOLE_PROCESS_DATA ProcessData);
+NTSTATUS FASTCALL ConSrvInsertObject(PCONSOLE_PROCESS_DATA ProcessData,
+ PHANDLE Handle,
+ Object_t *Object,
DWORD Access,
- BOOL LockConsole,
- ULONG Type);
-VOID FASTCALL Win32CsrUnlockObject(Object_t *Object,
+ BOOL Inheritable,
+ DWORD ShareMode);
+NTSTATUS FASTCALL ConSrvRemoveObject(PCONSOLE_PROCESS_DATA ProcessData,
+ HANDLE Handle);
+NTSTATUS FASTCALL ConSrvGetObject(PCONSOLE_PROCESS_DATA ProcessData,
+ HANDLE Handle,
+ Object_t** Object,
+ PCONSOLE_IO_HANDLE* Entry OPTIONAL,
+ DWORD Access,
+ BOOL LockConsole,
+ ULONG Type);
+VOID FASTCALL ConSrvReleaseObject(Object_t *Object,
+ BOOL IsConsoleLocked);
+NTSTATUS FASTCALL ConSrvAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData,
+ PHANDLE pInputHandle,
+ PHANDLE pOutputHandle,
+ PHANDLE pErrorHandle,
+ int ShowCmd,
+ PCSR_PROCESS CsrProcess);
+VOID FASTCALL ConSrvRemoveConsole(PCONSOLE_PROCESS_DATA ProcessData);
+NTSTATUS FASTCALL ConSrvGetConsole(PCONSOLE_PROCESS_DATA ProcessData,
+ struct _CONSOLE** Console,
+ BOOL LockConsole);
+VOID FASTCALL ConSrvReleaseConsole(struct _CONSOLE* Console,
BOOL IsConsoleLocked);
-VOID FASTCALL Win32CsrUnlockConsole(struct _CONSOLE* Console,
- BOOL IsConsoleLocked);
-NTSTATUS FASTCALL Win32CsrReleaseObject(PCONSOLE_PROCESS_DATA ProcessData,
- HANDLE Handle);
-NTSTATUS FASTCALL Win32CsrAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData,
- PHANDLE pInputHandle,
- PHANDLE pOutputHandle,
- PHANDLE pErrorHandle,
- int ShowCmd,
- PCSR_PROCESS CsrProcess);
-VOID FASTCALL Win32CsrReleaseConsole(PCONSOLE_PROCESS_DATA ProcessData);
-NTSTATUS FASTCALL ConioConsoleFromProcessData(PCONSOLE_PROCESS_DATA ProcessData,
- struct _CONSOLE** Console,
- BOOL LockConsole);
-
-NTSTATUS NTAPI ConsoleNewProcess(PCSR_PROCESS SourceProcess,
- PCSR_PROCESS TargetProcess);
-NTSTATUS NTAPI ConsoleConnect(IN PCSR_PROCESS CsrProcess,
- IN OUT PVOID ConnectionInfo,
- IN OUT PULONG ConnectionInfoLength);
-VOID NTAPI ConsoleDisconnect(PCSR_PROCESS Process);
+NTSTATUS NTAPI ConSrvNewProcess(PCSR_PROCESS SourceProcess,
+ PCSR_PROCESS TargetProcess);
+NTSTATUS NTAPI ConSrvConnect(IN PCSR_PROCESS CsrProcess,
+ IN OUT PVOID ConnectionInfo,
+ IN OUT PULONG ConnectionInfoLength);
+VOID NTAPI ConSrvDisconnect(PCSR_PROCESS Process);
/* lineinput.c */
CSR_API(SrvGetConsoleCommandHistoryLength);
Modified: branches/ros-csrss/win32ss/user/consrv/guiconsole.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/g…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/guiconsole.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/guiconsole.c [iso-8859-1] Thu Jan 24 22:41:33
2013
@@ -1285,7 +1285,7 @@
/* FIXME: Windows will wait up to 5 seconds for the thread to exit.
* We shouldn't wait here, though, since the console lock is entered.
* A copy of the thread list probably needs to be made. */
- ConioConsoleCtrlEvent(CTRL_CLOSE_EVENT, current);
+ ConSrvConsoleCtrlEvent(CTRL_CLOSE_EVENT, current);
}
/// LOCK /// LeaveCriticalSection(&Console->Lock);
@@ -2159,7 +2159,7 @@
MSG msg;
PHANDLE GraphicsStartupEvent = (PHANDLE) Data;
- NotifyWnd = CreateWindowW(L"Win32CsrCreateNotify",
+ NotifyWnd = CreateWindowW(L"ConSrvCreateNotify",
L"",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
@@ -2200,7 +2200,7 @@
}
wc.cbSize = sizeof(WNDCLASSEXW);
- wc.lpszClassName = L"Win32CsrCreateNotify";
+ wc.lpszClassName = L"ConSrvCreateNotify";
wc.lpfnWndProc = GuiConsoleNotifyWndProc;
wc.style = 0;
wc.hInstance = (HINSTANCE)GetModuleHandleW(NULL);
@@ -2345,7 +2345,7 @@
if (NULL == ThreadHandle)
{
CloseHandle(GraphicsStartupEvent);
- DPRINT1("Win32Csr: Failed to create graphics console thread. Expect
problems\n");
+ DPRINT1("CONSRV: Failed to create graphics console thread. Expect
problems\n");
return STATUS_UNSUCCESSFUL;
}
SetThreadPriority(ThreadHandle, THREAD_PRIORITY_HIGHEST);
@@ -2356,7 +2356,7 @@
if (NULL == NotifyWnd)
{
- DPRINT1("Win32Csr: Failed to create notification window.\n");
+ DPRINT1("CONSRV: Failed to create notification window.\n");
return STATUS_UNSUCCESSFUL;
}
}
@@ -2364,7 +2364,7 @@
sizeof(GUI_CONSOLE_DATA));
if (!GuiData)
{
- DPRINT1("Win32Csr: Failed to create GUI_CONSOLE_DATA\n");
+ DPRINT1("CONSRV: Failed to create GUI_CONSOLE_DATA\n");
return STATUS_UNSUCCESSFUL;
}
Modified: branches/ros-csrss/win32ss/user/consrv/handle.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/h…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/handle.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/handle.c [iso-8859-1] Thu Jan 24 22:41:33 2013
@@ -35,7 +35,7 @@
}
static VOID
-Win32CsrCreateHandleEntry(PCONSOLE_IO_HANDLE Entry)
+ConSrvCreateHandleEntry(PCONSOLE_IO_HANDLE Entry)
{
/// LOCK /// Object_t *Object = Entry->Object;
/// LOCK /// EnterCriticalSection(&Object->Console->Lock);
@@ -44,7 +44,7 @@
}
static VOID
-Win32CsrCloseHandleEntry(PCONSOLE_IO_HANDLE Entry)
+ConSrvCloseHandleEntry(PCONSOLE_IO_HANDLE Entry)
{
Object_t *Object = Entry->Object;
if (Object != NULL)
@@ -104,10 +104,10 @@
/* static */ NTSTATUS
FASTCALL
-Win32CsrInitHandlesTable(IN OUT PCONSOLE_PROCESS_DATA ProcessData,
- OUT PHANDLE pInputHandle,
- OUT PHANDLE pOutputHandle,
- OUT PHANDLE pErrorHandle)
+ConSrvInitHandlesTable(IN OUT PCONSOLE_PROCESS_DATA ProcessData,
+ OUT PHANDLE pInputHandle,
+ OUT PHANDLE pOutputHandle,
+ OUT PHANDLE pErrorHandle)
{
NTSTATUS Status;
HANDLE InputHandle = INVALID_HANDLE_VALUE,
@@ -125,7 +125,7 @@
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
/* Insert the Input handle */
- Status = Win32CsrInsertObject(ProcessData,
+ Status = ConSrvInsertObject(ProcessData,
&InputHandle,
&ProcessData->Console->InputBuffer.Header,
GENERIC_READ | GENERIC_WRITE,
@@ -135,12 +135,12 @@
{
DPRINT1("Failed to insert the input handle\n");
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
- Win32CsrFreeHandlesTable(ProcessData);
+ ConSrvFreeHandlesTable(ProcessData);
return Status;
}
/* Insert the Output handle */
- Status = Win32CsrInsertObject(ProcessData,
+ Status = ConSrvInsertObject(ProcessData,
&OutputHandle,
&ProcessData->Console->ActiveBuffer->Header,
GENERIC_READ | GENERIC_WRITE,
@@ -150,12 +150,12 @@
{
DPRINT1("Failed to insert the output handle\n");
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
- Win32CsrFreeHandlesTable(ProcessData);
+ ConSrvFreeHandlesTable(ProcessData);
return Status;
}
/* Insert the Error handle */
- Status = Win32CsrInsertObject(ProcessData,
+ Status = ConSrvInsertObject(ProcessData,
&ErrorHandle,
&ProcessData->Console->ActiveBuffer->Header,
GENERIC_READ | GENERIC_WRITE,
@@ -165,7 +165,7 @@
{
DPRINT1("Failed to insert the error handle\n");
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
- Win32CsrFreeHandlesTable(ProcessData);
+ ConSrvFreeHandlesTable(ProcessData);
return Status;
}
@@ -180,8 +180,8 @@
NTSTATUS
FASTCALL
-Win32CsrInheritHandlesTable(IN PCONSOLE_PROCESS_DATA SourceProcessData,
- IN PCONSOLE_PROCESS_DATA TargetProcessData)
+ConSrvInheritHandlesTable(IN PCONSOLE_PROCESS_DATA SourceProcessData,
+ IN PCONSOLE_PROCESS_DATA TargetProcessData)
{
NTSTATUS Status = STATUS_SUCCESS;
ULONG i;
@@ -219,10 +219,10 @@
{
/*
* Copy the handle data and increment the reference count of the
- * pointed object (via the call to Win32CsrCreateHandleEntry).
+ * pointed object (via the call to ConSrvCreateHandleEntry).
*/
TargetProcessData->HandleTable[i] = SourceProcessData->HandleTable[i];
- Win32CsrCreateHandleEntry(&TargetProcessData->HandleTable[i]);
+ ConSrvCreateHandleEntry(&TargetProcessData->HandleTable[i]);
}
}
@@ -233,9 +233,9 @@
VOID
FASTCALL
-Win32CsrFreeHandlesTable(PCONSOLE_PROCESS_DATA ProcessData)
-{
- DPRINT1("Win32CsrFreeHandlesTable\n");
+ConSrvFreeHandlesTable(PCONSOLE_PROCESS_DATA ProcessData)
+{
+ DPRINT1("ConSrvFreeHandlesTable\n");
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
@@ -246,7 +246,7 @@
/* Close all console handles and free the handle table memory */
for (i = 0; i < ProcessData->HandleTableSize; i++)
{
- Win32CsrCloseHandleEntry(&ProcessData->HandleTable[i]);
+ ConSrvCloseHandleEntry(&ProcessData->HandleTable[i]);
}
RtlFreeHeap(ConSrvHeap, 0, ProcessData->HandleTable);
ProcessData->HandleTable = NULL;
@@ -259,12 +259,12 @@
NTSTATUS
FASTCALL
-Win32CsrInsertObject(PCONSOLE_PROCESS_DATA ProcessData,
- PHANDLE Handle,
- Object_t *Object,
- DWORD Access,
- BOOL Inheritable,
- DWORD ShareMode)
+ConSrvInsertObject(PCONSOLE_PROCESS_DATA ProcessData,
+ PHANDLE Handle,
+ Object_t *Object,
+ DWORD Access,
+ BOOL Inheritable,
+ DWORD ShareMode)
{
#define IO_HANDLES_INCREMENT 2*3
@@ -303,7 +303,7 @@
ProcessData->HandleTable[i].Access = Access;
ProcessData->HandleTable[i].Inheritable = Inheritable;
ProcessData->HandleTable[i].ShareMode = ShareMode;
- Win32CsrCreateHandleEntry(&ProcessData->HandleTable[i]);
+ ConSrvCreateHandleEntry(&ProcessData->HandleTable[i]);
*Handle = ULongToHandle((i << 2) | 0x3);
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
@@ -313,8 +313,8 @@
NTSTATUS
FASTCALL
-Win32CsrReleaseObject(PCONSOLE_PROCESS_DATA ProcessData,
- HANDLE Handle)
+ConSrvRemoveObject(PCONSOLE_PROCESS_DATA ProcessData,
+ HANDLE Handle)
{
ULONG_PTR h = (ULONG_PTR)Handle >> 2;
Object_t *Object;
@@ -328,8 +328,8 @@
return STATUS_INVALID_HANDLE;
}
- DPRINT1("Win32CsrReleaseObject - Process 0x%p, Release 0x%p\n",
ProcessData->Process, &ProcessData->HandleTable[h]);
- Win32CsrCloseHandleEntry(&ProcessData->HandleTable[h]);
+ DPRINT1("ConSrvRemoveObject - Process 0x%p, Release 0x%p\n",
ProcessData->Process, &ProcessData->HandleTable[h]);
+ ConSrvCloseHandleEntry(&ProcessData->HandleTable[h]);
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
@@ -338,13 +338,13 @@
NTSTATUS
FASTCALL
-Win32CsrLockObject(PCONSOLE_PROCESS_DATA ProcessData,
- HANDLE Handle,
- Object_t** Object,
- PCONSOLE_IO_HANDLE* Entry OPTIONAL,
- DWORD Access,
- BOOL LockConsole,
- ULONG Type)
+ConSrvGetObject(PCONSOLE_PROCESS_DATA ProcessData,
+ HANDLE Handle,
+ Object_t** Object,
+ PCONSOLE_IO_HANDLE* Entry OPTIONAL,
+ DWORD Access,
+ BOOL LockConsole,
+ ULONG Type)
{
ULONG_PTR h = (ULONG_PTR)Handle >> 2;
PCONSOLE_IO_HANDLE HandleEntry = NULL;
@@ -353,7 +353,7 @@
ASSERT(Object);
if (Entry) *Entry = NULL;
- // DPRINT("Win32CsrLockObject, Object: %x, %x, %x\n",
+ // DPRINT("ConSrvGetObject, Object: %x, %x, %x\n",
// Object, Handle, ProcessData ? ProcessData->HandleTableSize : 0);
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
@@ -387,38 +387,27 @@
return STATUS_SUCCESS;
}
-VOID FASTCALL
-Win32CsrUnlockConsole(PCONSOLE Console,
- BOOL IsConsoleLocked)
-{
- if (IsConsoleLocked) LeaveCriticalSection(&Console->Lock);
-
- /* Decrement reference count */
- if (_InterlockedDecrement(&Console->ReferenceCount) == 0)
- ConioDeleteConsole(Console);
-}
-
VOID
FASTCALL
-Win32CsrUnlockObject(Object_t *Object,
- BOOL IsConsoleLocked)
-{
- Win32CsrUnlockConsole(Object->Console, IsConsoleLocked);
+ConSrvReleaseObject(Object_t *Object,
+ BOOL IsConsoleLocked)
+{
+ ConSrvReleaseConsole(Object->Console, IsConsoleLocked);
}
NTSTATUS
FASTCALL
-Win32CsrAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData,
- PHANDLE pInputHandle,
- PHANDLE pOutputHandle,
- PHANDLE pErrorHandle,
- int ShowCmd,
- PCSR_PROCESS CsrProcess)
+ConSrvAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData,
+ PHANDLE pInputHandle,
+ PHANDLE pOutputHandle,
+ PHANDLE pErrorHandle,
+ int ShowCmd,
+ PCSR_PROCESS CsrProcess)
{
NTSTATUS Status = STATUS_SUCCESS;
/* Initialize a new Console owned by the Console Leader Process */
- Status = CsrInitConsole(&ProcessData->Console, ShowCmd, CsrProcess);
+ Status = ConSrvInitConsole(&ProcessData->Console, ShowCmd, CsrProcess);
if (!NT_SUCCESS(Status))
{
DPRINT1("Console initialization failed\n");
@@ -426,7 +415,7 @@
}
/* Initialize the handles table */
- Status = Win32CsrInitHandlesTable(ProcessData,
+ Status = ConSrvInitHandlesTable(ProcessData,
pInputHandle,
pOutputHandle,
pErrorHandle);
@@ -434,8 +423,8 @@
{
DPRINT1("Failed to initialize the handles table\n");
- // Win32CsrReleaseConsole(ProcessData);
- ConioDeleteConsole(ProcessData->Console);
+ // ConSrvRemoveConsole(ProcessData);
+ ConSrvDeleteConsole(ProcessData->Console);
ProcessData->Console = NULL;
return Status;
@@ -446,25 +435,25 @@
VOID
FASTCALL
-Win32CsrReleaseConsole(PCONSOLE_PROCESS_DATA ProcessData)
+ConSrvRemoveConsole(PCONSOLE_PROCESS_DATA ProcessData)
{
PCONSOLE Console;
- DPRINT1("Win32CsrReleaseConsole\n");
+ DPRINT1("ConSrvRemoveConsole\n");
/* Close all console handles and free the handle table memory */
- Win32CsrFreeHandlesTable(ProcessData);
+ ConSrvFreeHandlesTable(ProcessData);
/* Detach process from console */
Console = ProcessData->Console;
if (Console != NULL)
{
- DPRINT1("Win32CsrReleaseConsole - Console->ReferenceCount = %lu - We are
going to decrement it !\n", Console->ReferenceCount);
+ DPRINT1("ConSrvRemoveConsole - Console->ReferenceCount = %lu - We are
going to decrement it !\n", Console->ReferenceCount);
ProcessData->Console = NULL;
EnterCriticalSection(&Console->Lock);
- DPRINT1("Win32CsrReleaseConsole - Locking OK\n");
+ DPRINT1("ConSrvRemoveConsole - Locking OK\n");
RemoveEntryList(&ProcessData->ConsoleLink);
- Win32CsrUnlockConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
//CloseHandle(ProcessData->ConsoleEvent);
//ProcessData->ConsoleEvent = NULL;
}
@@ -472,9 +461,9 @@
NTSTATUS
FASTCALL
-ConioConsoleFromProcessData(PCONSOLE_PROCESS_DATA ProcessData,
- PCONSOLE* Console,
- BOOL LockConsole)
+ConSrvGetConsole(PCONSOLE_PROCESS_DATA ProcessData,
+ PCONSOLE* Console,
+ BOOL LockConsole)
{
PCONSOLE ProcessConsole;
@@ -498,12 +487,23 @@
return STATUS_SUCCESS;
}
+VOID FASTCALL
+ConSrvReleaseConsole(PCONSOLE Console,
+ BOOL IsConsoleLocked)
+{
+ if (IsConsoleLocked) LeaveCriticalSection(&Console->Lock);
+
+ /* Decrement reference count */
+ if (_InterlockedDecrement(&Console->ReferenceCount) == 0)
+ ConSrvDeleteConsole(Console);
+}
+
NTSTATUS
NTAPI
-ConsoleNewProcess(PCSR_PROCESS SourceProcess,
- PCSR_PROCESS TargetProcess)
+ConSrvNewProcess(PCSR_PROCESS SourceProcess,
+ PCSR_PROCESS TargetProcess)
{
/**************************************************************************
* This function is called whenever a new process (GUI or CUI) is created.
@@ -511,22 +511,22 @@
* Copy the parent's handles table here if both the parent and the child
* processes are CUI. If we must actually create our proper console (and
* thus do not inherit from the console handles of the parent's), then we
- * will clean this table in the next ConsoleConnect call. Why we are doing
+ * will clean this table in the next ConSrvConnect call. Why we are doing
* this? It's because here, we still don't know whether or not we must
create
* a new console instead of inherit it from the parent, and, because in
- * ConsoleConnect we don't have any reference to the parent process anymore.
+ * ConSrvConnect we don't have any reference to the parent process anymore.
**************************************************************************/
PCONSOLE_PROCESS_DATA SourceProcessData, TargetProcessData;
- DPRINT1("ConsoleNewProcess inside\n");
+ DPRINT1("ConSrvNewProcess inside\n");
DPRINT1("SourceProcess = 0x%p ; TargetProcess = 0x%p\n", SourceProcess,
TargetProcess);
/* An empty target process is invalid */
if (!TargetProcess)
return STATUS_INVALID_PARAMETER;
- DPRINT1("ConsoleNewProcess - OK\n");
+ DPRINT1("ConSrvNewProcess - OK\n");
TargetProcessData = ConsoleGetPerProcessData(TargetProcess);
DPRINT1("TargetProcessData = 0x%p\n", TargetProcessData);
@@ -562,7 +562,7 @@
{
NTSTATUS Status;
- Status = Win32CsrInheritHandlesTable(SourceProcessData, TargetProcessData);
+ Status = ConSrvInheritHandlesTable(SourceProcessData, TargetProcessData);
if (!NT_SUCCESS(Status))
{
return Status;
@@ -573,7 +573,7 @@
}
else
{
- DPRINT1("ConsoleNewProcess - We don't launch a Console process :
SourceProcessData->Console = 0x%p ; TargetProcess->Flags = %lu\n",
SourceProcessData->Console, TargetProcess->Flags);
+ DPRINT1("ConSrvNewProcess - We don't launch a Console process :
SourceProcessData->Console = 0x%p ; TargetProcess->Flags = %lu\n",
SourceProcessData->Console, TargetProcess->Flags);
}
return STATUS_SUCCESS;
@@ -581,9 +581,9 @@
NTSTATUS
NTAPI
-ConsoleConnect(IN PCSR_PROCESS CsrProcess,
- IN OUT PVOID ConnectionInfo,
- IN OUT PULONG ConnectionInfoLength)
+ConSrvConnect(IN PCSR_PROCESS CsrProcess,
+ IN OUT PVOID ConnectionInfo,
+ IN OUT PULONG ConnectionInfoLength)
{
/**************************************************************************
* This function is called whenever a CUI new process is created.
@@ -593,7 +593,7 @@
PCONSOLE_CONNECTION_INFO ConnectInfo = (PCONSOLE_CONNECTION_INFO)ConnectionInfo;
PCONSOLE_PROCESS_DATA ProcessData = ConsoleGetPerProcessData(CsrProcess);
- DPRINT1("ConsoleConnect\n");
+ DPRINT1("ConSrvConnect\n");
if ( ConnectionInfo == NULL ||
ConnectionInfoLength == NULL ||
@@ -606,7 +606,7 @@
/* If we don't need a console, then get out of here */
if (!ConnectInfo->ConsoleNeeded || !ProcessData->ConsoleApp) // In fact, it is
for GUI apps.
{
- DPRINT("ConsoleConnect - No console needed\n");
+ DPRINT("ConSrvConnect - No console needed\n");
return STATUS_SUCCESS;
}
@@ -614,10 +614,10 @@
if (!ConnectInfo->Console ||
ConnectInfo->Console != ProcessData->ParentConsole)
{
- DPRINT1("ConsoleConnect - Allocate a new console\n");
+ DPRINT1("ConSrvConnect - Allocate a new console\n");
/*
- * We are about to create a new console. However when ConsoleNewProcess
+ * We are about to create a new console. However when ConSrvNewProcess
* was called, we didn't know that we wanted to create a new console and
* therefore, we by default inherited the handles table from our parent
* process. It's only now that we notice that in fact we do not need
@@ -626,10 +626,10 @@
* Therefore, free the console we can have and our handles table,
* and recreate a new one later on.
*/
- Win32CsrReleaseConsole(ProcessData);
+ ConSrvRemoveConsole(ProcessData);
/* Initialize a new Console owned by the Console Leader Process */
- Status = Win32CsrAllocateConsole(ProcessData,
+ Status = ConSrvAllocateConsole(ProcessData,
&ConnectInfo->InputHandle,
&ConnectInfo->OutputHandle,
&ConnectInfo->ErrorHandle,
@@ -643,7 +643,7 @@
}
else /* We inherit it from the parent */
{
- DPRINT1("ConsoleConnect - Reuse current (parent's) console\n");
+ DPRINT1("ConSrvConnect - Reuse current (parent's) console\n");
/* Reuse our current console */
ProcessData->Console = ConnectInfo->Console;
@@ -665,7 +665,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("NtDuplicateObject() failed: %lu\n", Status);
- Win32CsrReleaseConsole(ProcessData);
+ ConSrvRemoveConsole(ProcessData);
return Status;
}
@@ -684,7 +684,7 @@
VOID
WINAPI
-ConsoleDisconnect(PCSR_PROCESS Process)
+ConSrvDisconnect(PCSR_PROCESS Process)
{
PCONSOLE_PROCESS_DATA ProcessData = ConsoleGetPerProcessData(Process);
@@ -692,12 +692,12 @@
* This function is called whenever a new process (GUI or CUI) is destroyed.
**************************************************************************/
- DPRINT1("ConsoleDisconnect called\n");
+ DPRINT1("ConSrvDisconnect called\n");
if ( ProcessData->Console != NULL ||
ProcessData->HandleTable != NULL )
{
- DPRINT1("ConsoleDisconnect - calling Win32CsrReleaseConsole\n");
- Win32CsrReleaseConsole(ProcessData);
+ DPRINT1("ConSrvDisconnect - calling ConSrvRemoveConsole\n");
+ ConSrvRemoveConsole(ProcessData);
}
RtlDeleteCriticalSection(&ProcessData->HandleTableLock);
@@ -709,7 +709,7 @@
{
PCONSOLE_CLOSEHANDLE CloseHandleRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.CloseHandleRequest;
- return
Win32CsrReleaseObject(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
+ return
ConSrvRemoveObject(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
CloseHandleRequest->ConsoleHandle);
}
@@ -773,7 +773,7 @@
}
}
- ApiMessage->Status = Win32CsrInsertObject(ProcessData,
+ ApiMessage->Status = ConSrvInsertObject(ProcessData,
&DuplicateHandleRequest->ConsoleHandle, // Use the new handle value!
Entry->Object,
DesiredAccess,
@@ -782,7 +782,7 @@
if (NT_SUCCESS(ApiMessage->Status) &&
DuplicateHandleRequest->Options & DUPLICATE_CLOSE_SOURCE)
{
- Win32CsrCloseHandleEntry(Entry);
+ ConSrvCloseHandleEntry(Entry);
}
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
Modified: branches/ros-csrss/win32ss/user/consrv/init.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/i…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/init.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/init.c [iso-8859-1] Thu Jan 24 22:41:33 2013
@@ -302,7 +302,7 @@
/*
-PCSR_API_ROUTINE Win32CsrApiDefinitions[] =
+PCSR_API_ROUTINE ConSrvApiDefinitions[] =
{
CsrGetHandle,
CsrGetHandle,
@@ -330,7 +330,7 @@
CsrGenerateCtrlEvent,
};
-static CSRSS_API_DEFINITION Win32CsrApiDefinitions[] =
+static CSRSS_API_DEFINITION ConSrvApiDefinitions[] =
{
CSRSS_DEFINE_API(GET_INPUT_HANDLE, CsrGetHandle),
CSRSS_DEFINE_API(GET_OUTPUT_HANDLE, CsrGetHandle),
@@ -451,7 +451,7 @@
// BaseSrvSharedHeap = LoadedServerDll->SharedSection; // Get the CSR shared
heap.
// LoadedServerDll->SharedSection = BaseStaticServerData;
- CsrInitConsoleSupport();
+ ConSrvInitConsoleSupport();
/* Setup the DLL Object */
LoadedServerDll->ApiBase = CONSRV_FIRST_API_NUMBER;
@@ -460,10 +460,10 @@
LoadedServerDll->ValidTable = ConsoleServerApiServerValidTable;
LoadedServerDll->NameTable = ConsoleServerApiNameTable;
LoadedServerDll->SizeOfProcessData = sizeof(CONSOLE_PROCESS_DATA);
- LoadedServerDll->ConnectCallback = ConsoleConnect;
- LoadedServerDll->DisconnectCallback = ConsoleDisconnect;
- LoadedServerDll->NewProcessCallback = ConsoleNewProcess;
- // LoadedServerDll->HardErrorCallback = Win32CsrHardError;
+ LoadedServerDll->ConnectCallback = ConSrvConnect;
+ LoadedServerDll->DisconnectCallback = ConSrvDisconnect;
+ LoadedServerDll->NewProcessCallback = ConSrvNewProcess;
+ // LoadedServerDll->HardErrorCallback = ConSrvHardError;
/* All done */
return STATUS_SUCCESS;
Modified: branches/ros-csrss/win32ss/user/consrv/lineinput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/l…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/lineinput.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/lineinput.c [iso-8859-1] Thu Jan 24 22:41:33
2013
@@ -167,7 +167,7 @@
return STATUS_INVALID_PARAMETER;
}
- Status = ConioGetConsole(ProcessData, &Console, TRUE);
+ Status = ConSrvGetConsole(ProcessData, &Console, TRUE);
if (NT_SUCCESS(Status))
{
Hist = HistoryFindBuffer(Console,
&GetCommandHistoryLengthRequest->ExeName);
@@ -177,7 +177,7 @@
Length += Hist->Entries[i].Length + sizeof(WCHAR);
}
GetCommandHistoryLengthRequest->Length = Length;
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
}
return Status;
}
@@ -205,7 +205,7 @@
return STATUS_INVALID_PARAMETER;
}
- Status = ConioGetConsole(ProcessData, &Console, TRUE);
+ Status = ConSrvGetConsole(ProcessData, &Console, TRUE);
if (NT_SUCCESS(Status))
{
Hist = HistoryFindBuffer(Console, &GetCommandHistoryRequest->ExeName);
@@ -225,7 +225,7 @@
}
}
GetCommandHistoryRequest->Length = Buffer -
(PBYTE)GetCommandHistoryRequest->History;
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
}
return Status;
}
@@ -246,12 +246,12 @@
return STATUS_INVALID_PARAMETER;
}
- Status = ConioGetConsole(ProcessData, &Console, TRUE);
+ Status = ConSrvGetConsole(ProcessData, &Console, TRUE);
if (NT_SUCCESS(Status))
{
Hist = HistoryFindBuffer(Console,
&ExpungeCommandHistoryRequest->ExeName);
HistoryDeleteBuffer(Hist);
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
}
return Status;
}
@@ -274,7 +274,7 @@
return STATUS_INVALID_PARAMETER;
}
- Status = ConioGetConsole(ProcessData, &Console, TRUE);
+ Status = ConSrvGetConsole(ProcessData, &Console, TRUE);
if (NT_SUCCESS(Status))
{
Hist = HistoryFindBuffer(Console,
&SetHistoryNumberCommandsRequest->ExeName);
@@ -302,7 +302,7 @@
RtlFreeHeap(ConSrvHeap, 0, OldEntryList);
}
}
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
}
return Status;
}
@@ -311,13 +311,13 @@
{
PCONSOLE_GETSETHISTORYINFO HistoryInfoRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.HistoryInfoRequest;
PCONSOLE Console;
- NTSTATUS Status =
ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
+ NTSTATUS Status =
ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
if (NT_SUCCESS(Status))
{
HistoryInfoRequest->HistoryBufferSize = Console->HistoryBufferSize;
HistoryInfoRequest->NumberOfHistoryBuffers =
Console->NumberOfHistoryBuffers;
HistoryInfoRequest->dwFlags = Console->HistoryNoDup;
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
}
return Status;
}
@@ -326,13 +326,13 @@
{
PCONSOLE_GETSETHISTORYINFO HistoryInfoRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.HistoryInfoRequest;
PCONSOLE Console;
- NTSTATUS Status =
ConioGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
+ NTSTATUS Status =
ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console,
TRUE);
if (NT_SUCCESS(Status))
{
Console->HistoryBufferSize = HistoryInfoRequest->HistoryBufferSize;
Console->NumberOfHistoryBuffers =
HistoryInfoRequest->NumberOfHistoryBuffers;
Console->HistoryNoDup = HistoryInfoRequest->dwFlags &
HISTORY_NO_DUP_FLAG;
- ConioReleaseConsole(Console, TRUE);
+ ConSrvReleaseConsole(Console, TRUE);
}
return Status;
}
Modified: branches/ros-csrss/win32ss/user/consrv/tuiconsole.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/t…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/tuiconsole.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/tuiconsole.c [iso-8859-1] Thu Jan 24 22:41:33
2013
@@ -460,7 +460,7 @@
(PVOID)Console);
if (NULL == NewWindow)
{
- DPRINT1("CSR: Unable to create console window\n");
+ DPRINT1("CONSRV: Unable to create console window\n");
return 1;
}
Console->hWindow = NewWindow;
@@ -528,7 +528,7 @@
NULL);
if (NULL == ThreadHandle)
{
- DPRINT1("CSR: Unable to create console thread\n");
+ DPRINT1("CONSRV: Unable to create console thread\n");
return STATUS_UNSUCCESSFUL;
}
CloseHandle(ThreadHandle);