Author: hbelusca
Date: Sat Nov 17 23:29:53 2012
New Revision: 57725
URL:
http://svn.reactos.org/svn/reactos?rev=57725&view=rev
Log:
[KERNEL32]
- Use new structures and api indices namings.
[CONSRV]
- CSRSS_SET_CURSOR ==> CSRSS_SET_CURSOR_POSITION for SrvSetConsoleCursorPosition.
- Merge CSRSS_GET_CURSOR_INFO and CSRSS_SET_CURSOR_INFO into CSRSS_CURSOR_INFO.
Modified:
branches/ros-csrss/dll/win32/kernel32/client/console/console.c
branches/ros-csrss/include/reactos/subsys/win/conmsg.h
branches/ros-csrss/win32ss/user/consrv/conoutput.c
Modified: branches/ros-csrss/dll/win32/kernel32/client/console/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cl…
==============================================================================
--- branches/ros-csrss/dll/win32/kernel32/client/console/console.c [iso-8859-1]
(original)
+++ branches/ros-csrss/dll/win32/kernel32/client/console/console.c [iso-8859-1] Sat Nov 17
23:29:53 2012
@@ -362,7 +362,7 @@
{
DPRINT1("GetNumberOfConsoleFonts() UNIMPLEMENTED!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 1; /* FIXME: call csrss.exe */
+ return 1;
}
@@ -593,11 +593,14 @@
/*
* FUNCTION: Checks whether the given handle is a valid console handle.
+ *
* ARGUMENTS:
* Handle - Handle to be checked
+ *
* RETURNS:
* TRUE: Handle is a valid console handle
* FALSE: Handle is not a valid console handle.
+ *
* STATUS: Officially undocumented
*
* @implemented
@@ -606,22 +609,22 @@
WINAPI
VerifyConsoleIoHandle(HANDLE Handle)
{
- CSR_API_MESSAGE Request;
- NTSTATUS Status;
-
- Request.Data.VerifyHandleRequest.Handle = Handle;
-
- Status = CsrClientCallServer(&Request,
- NULL,
- CSR_CREATE_API_NUMBER(CSR_NATIVE, VERIFY_HANDLE),
- sizeof(CSR_API_MESSAGE));
+ NTSTATUS Status;
+ CONSOLE_API_MESSAGE ApiMessage;
+
+ ApiMessage.Data.VerifyHandleRequest.Handle = Handle;
+
+ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepVerifyIoHandle),
+ sizeof(CSRSS_VERIFY_HANDLE));
if (!NT_SUCCESS(Status))
{
BaseSetLastNTError(Status);
return FALSE;
}
- return (BOOL)NT_SUCCESS(Request.Status);
+ return (BOOL)NT_SUCCESS(ApiMessage.Status);
}
@@ -664,15 +667,15 @@
WINAPI
CloseConsoleHandle(HANDLE Handle)
{
- CSR_API_MESSAGE Request;
- NTSTATUS Status;
-
- Request.Data.CloseHandleRequest.Handle = Handle;
-
- Status = CsrClientCallServer(&Request,
- NULL,
- CSR_CREATE_API_NUMBER(CSR_NATIVE, CLOSE_HANDLE),
- sizeof(CSR_API_MESSAGE));
+ NTSTATUS Status;
+ CONSOLE_API_MESSAGE ApiMessage;
+
+ ApiMessage.Data.CloseHandleRequest.Handle = Handle;
+
+ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepCloseHandle),
+ sizeof(CSRSS_CLOSE_HANDLE));
if (!NT_SUCCESS(Status))
{
BaseSetLastNTError(Status);
@@ -682,20 +685,23 @@
return TRUE;
}
+
/*
* @implemented
*/
HANDLE
WINAPI
GetStdHandle(DWORD nStdHandle)
- /*
- * FUNCTION: Get a handle for the standard input, standard output
- * and a standard error device.
- * ARGUMENTS:
- * nStdHandle - Specifies the device for which to return the handle.
- * RETURNS: If the function succeeds, the return value is the handle
- * of the specified device. Otherwise the value is INVALID_HANDLE_VALUE.
- */
+/*
+ * FUNCTION: Get a handle for the standard input, standard output
+ * and a standard error device.
+ *
+ * ARGUMENTS:
+ * nStdHandle - Specifies the device for which to return the handle.
+ *
+ * RETURNS: If the function succeeds, the return value is the handle
+ * of the specified device. Otherwise the value is INVALID_HANDLE_VALUE.
+ */
{
PRTL_USER_PROCESS_PARAMETERS Ppb;
@@ -712,7 +718,7 @@
return Ppb->StandardError;
}
- SetLastError (ERROR_INVALID_PARAMETER);
+ SetLastError(ERROR_INVALID_PARAMETER);
return INVALID_HANDLE_VALUE;
}
@@ -724,14 +730,16 @@
WINAPI
SetStdHandle(DWORD nStdHandle,
HANDLE hHandle)
- /*
- * FUNCTION: Set the handle for the standard input, standard output or
- * the standard error device.
- * ARGUMENTS:
- * nStdHandle - Specifies the handle to be set.
- * hHandle - The handle to set.
- * RETURNS: TRUE if the function succeeds, FALSE otherwise.
- */
+/*
+ * FUNCTION: Set the handle for the standard input, standard output or
+ * the standard error device.
+ *
+ * ARGUMENTS:
+ * nStdHandle - Specifies the handle to be set.
+ * hHandle - The handle to set.
+ *
+ * RETURNS: TRUE if the function succeeds, FALSE otherwise.
+ */
{
PRTL_USER_PROCESS_PARAMETERS Ppb;
@@ -769,8 +777,9 @@
WINAPI
AllocConsole(VOID)
{
- CSR_API_MESSAGE Request;
- NTSTATUS Status;
+ NTSTATUS Status;
+ CONSOLE_API_MESSAGE ApiMessage;
+ PCSRSS_ALLOC_CONSOLE AllocConsoleRequest = &ApiMessage.Data.AllocConsoleRequest;
HANDLE hStdError;
STARTUPINFO si;
@@ -783,26 +792,26 @@
GetStartupInfo(&si);
- Request.Data.AllocConsoleRequest.CtrlDispatcher = ConsoleControlDispatcher;
- Request.Data.AllocConsoleRequest.ConsoleNeeded = TRUE;
- Request.Data.AllocConsoleRequest.ShowCmd = si.wShowWindow;
-
- Status = CsrClientCallServer(&Request,
- NULL,
- CSR_CREATE_API_NUMBER(CSR_CONSOLE, ALLOC_CONSOLE),
- sizeof(CSR_API_MESSAGE));
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
- {
- BaseSetLastNTError(Status);
- return FALSE;
- }
-
- NtCurrentPeb()->ProcessParameters->ConsoleHandle =
Request.Data.AllocConsoleRequest.Console;
-
- SetStdHandle(STD_INPUT_HANDLE, Request.Data.AllocConsoleRequest.InputHandle);
- SetStdHandle(STD_OUTPUT_HANDLE, Request.Data.AllocConsoleRequest.OutputHandle);
-
- hStdError = DuplicateConsoleHandle(Request.Data.AllocConsoleRequest.OutputHandle,
+ AllocConsoleRequest->CtrlDispatcher = ConsoleControlDispatcher;
+ AllocConsoleRequest->ConsoleNeeded = TRUE;
+ AllocConsoleRequest->ShowCmd = si.wShowWindow;
+
+ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepAlloc),
+ sizeof(CSRSS_ALLOC_CONSOLE));
+ if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status))
+ {
+ BaseSetLastNTError(Status);
+ return FALSE;
+ }
+
+ NtCurrentPeb()->ProcessParameters->ConsoleHandle =
AllocConsoleRequest->Console;
+
+ SetStdHandle(STD_INPUT_HANDLE, AllocConsoleRequest->InputHandle);
+ SetStdHandle(STD_OUTPUT_HANDLE, AllocConsoleRequest->OutputHandle);
+
+ hStdError = DuplicateConsoleHandle(AllocConsoleRequest->OutputHandle,
0,
TRUE,
DUPLICATE_SAME_ACCESS);
@@ -824,14 +833,14 @@
// AG: I'm not sure if this is correct (what happens to std handles?)
// but I just tried to reverse what AllocConsole() does...
- CSR_API_MESSAGE Request;
- NTSTATUS Status;
-
- Status = CsrClientCallServer(&Request,
- NULL,
- CSR_CREATE_API_NUMBER(CSR_CONSOLE, FREE_CONSOLE),
- sizeof(CSR_API_MESSAGE));
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
+ NTSTATUS Status;
+ CONSOLE_API_MESSAGE ApiMessage;
+
+ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepFree),
+ sizeof(CSRSS_FREE_CONSOLE));
+ if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status))
{
BaseSetLastNTError(Status);
return FALSE;
@@ -852,21 +861,23 @@
GetConsoleScreenBufferInfo(HANDLE hConsoleOutput,
PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo)
{
- CSR_API_MESSAGE Request;
- NTSTATUS Status;
-
- Request.Data.ScreenBufferInfoRequest.ConsoleHandle = hConsoleOutput;
-
- Status = CsrClientCallServer(&Request,
- NULL,
- CSR_CREATE_API_NUMBER(CSR_CONSOLE, SCREEN_BUFFER_INFO),
- sizeof(CSR_API_MESSAGE));
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
- {
- BaseSetLastNTError(Status);
- return FALSE;
- }
- *lpConsoleScreenBufferInfo = Request.Data.ScreenBufferInfoRequest.Info;
+ NTSTATUS Status;
+ CONSOLE_API_MESSAGE ApiMessage;
+
+ ApiMessage.Data.ScreenBufferInfoRequest.ConsoleHandle = hConsoleOutput;
+
+ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetScreenBufferInfo),
+ sizeof(CSRSS_SCREEN_BUFFER_INFO));
+ if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status))
+ {
+ BaseSetLastNTError(Status);
+ return FALSE;
+ }
+
+ *lpConsoleScreenBufferInfo = ApiMessage.Data.ScreenBufferInfoRequest.Info;
+
return TRUE;
}
@@ -881,17 +892,17 @@
SetConsoleCursorPosition(HANDLE hConsoleOutput,
COORD dwCursorPosition)
{
- CSR_API_MESSAGE Request;
- NTSTATUS Status;
-
- Request.Data.SetCursorRequest.ConsoleHandle = hConsoleOutput;
- Request.Data.SetCursorRequest.Position = dwCursorPosition;
-
- Status = CsrClientCallServer(&Request,
- NULL,
- CSR_CREATE_API_NUMBER(CSR_CONSOLE, SET_CURSOR),
- sizeof(CSR_API_MESSAGE));
- if(!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
+ NTSTATUS Status;
+ CONSOLE_API_MESSAGE ApiMessage;
+
+ ApiMessage.Data.SetCursorPositionRequest.ConsoleHandle = hConsoleOutput;
+ ApiMessage.Data.SetCursorPositionRequest.Position = dwCursorPosition;
+
+ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetCursorPosition),
+ sizeof(CSRSS_SET_CURSOR_POSITION));
+ if(!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status))
{
BaseSetLastNTError(Status);
return FALSE;
@@ -996,8 +1007,8 @@
GetConsoleCursorInfo(HANDLE hConsoleOutput,
PCONSOLE_CURSOR_INFO lpConsoleCursorInfo)
{
- CSR_API_MESSAGE Request;
- NTSTATUS Status;
+ NTSTATUS Status;
+ CONSOLE_API_MESSAGE ApiMessage;
if (!lpConsoleCursorInfo)
{
@@ -1009,19 +1020,19 @@
return FALSE;
}
- Request.Data.GetCursorInfoRequest.ConsoleHandle = hConsoleOutput;
-
- Status = CsrClientCallServer(&Request,
- NULL,
- CSR_CREATE_API_NUMBER(CSR_CONSOLE, GET_CURSOR_INFO),
- sizeof(CSR_API_MESSAGE));
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
- {
- BaseSetLastNTError(Status);
- return FALSE;
- }
-
- *lpConsoleCursorInfo = Request.Data.GetCursorInfoRequest.Info;
+ ApiMessage.Data.CursorInfoRequest.ConsoleHandle = hConsoleOutput;
+
+ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetCursorInfo),
+ sizeof(CSRSS_CURSOR_INFO));
+ if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status))
+ {
+ BaseSetLastNTError(Status);
+ return FALSE;
+ }
+
+ *lpConsoleCursorInfo = ApiMessage.Data.CursorInfoRequest.Info;
return TRUE;
}
@@ -1158,6 +1169,7 @@
return TRUE;
}
+
/*--------------------------------------------------------------
* SetConsoleCursorInfo
*
@@ -1168,17 +1180,17 @@
SetConsoleCursorInfo(HANDLE hConsoleOutput,
CONST CONSOLE_CURSOR_INFO *lpConsoleCursorInfo)
{
- CSR_API_MESSAGE Request;
- NTSTATUS Status;
-
- Request.Data.SetCursorInfoRequest.ConsoleHandle = hConsoleOutput;
- Request.Data.SetCursorInfoRequest.Info = *lpConsoleCursorInfo;
-
- Status = CsrClientCallServer(&Request,
- NULL,
- CSR_CREATE_API_NUMBER(CSR_CONSOLE, SET_CURSOR_INFO),
- sizeof(CSR_API_MESSAGE));
- if(!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
+ NTSTATUS Status;
+ CONSOLE_API_MESSAGE ApiMessage;
+
+ ApiMessage.Data.CursorInfoRequest.ConsoleHandle = hConsoleOutput;
+ ApiMessage.Data.CursorInfoRequest.Info = *lpConsoleCursorInfo;
+
+ Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetCursorInfo),
+ sizeof(CSRSS_CURSOR_INFO));
+ if(!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status))
{
BaseSetLastNTError(Status);
return FALSE;
Modified: branches/ros-csrss/include/reactos/subsys/win/conmsg.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
==============================================================================
--- branches/ros-csrss/include/reactos/subsys/win/conmsg.h [iso-8859-1] (original)
+++ branches/ros-csrss/include/reactos/subsys/win/conmsg.h [iso-8859-1] Sat Nov 17
23:29:53 2012
@@ -42,7 +42,7 @@
ConsolepFlushInputBuffer,
// ConsolepGetLargestWindowSize,
ConsolepSetScreenBufferSize,
- // ConsolepSetCursorPosition,
+ ConsolepSetCursorPosition,
ConsolepSetCursorInfo,
// ConsolepSetWindowInfo,
ConsolepScrollScreenBuffer,
@@ -63,7 +63,7 @@
ConsolepCreateScreenBuffer,
// ConsolepInvalidateBitMapRect,
// ConsolepVDMOperation,
- ConsolepSetCursor,
+ // ConsolepSetCursor,
// ConsolepShowCursor,
// ConsolepMenuControl,
// ConsolepSetPalette,
@@ -181,7 +181,7 @@
{
HANDLE ConsoleHandle;
COORD Position;
-} CSRSS_SET_CURSOR, *PCSRSS_SET_CURSOR;
+} CSRSS_SET_CURSOR_POSITION, *PCSRSS_SET_CURSOR_POSITION;
typedef struct
{
@@ -229,13 +229,7 @@
{
HANDLE ConsoleHandle;
CONSOLE_CURSOR_INFO Info;
-} CSRSS_GET_CURSOR_INFO, *PCSRSS_GET_CURSOR_INFO;
-
-typedef struct
-{
- HANDLE ConsoleHandle;
- CONSOLE_CURSOR_INFO Info;
-} CSRSS_SET_CURSOR_INFO, *PCSRSS_SET_CURSOR_INFO;
+} CSRSS_CURSOR_INFO, *PCSRSS_CURSOR_INFO;
typedef struct
{
@@ -585,11 +579,8 @@
CSRSS_GET_INPUT_WAIT_HANDLE GetConsoleInputWaitHandle;
/* Cursor */
- CSRSS_SET_CURSOR SetCursorRequest;
- CSRSS_GET_CURSOR_INFO GetCursorInfoRequest;
- CSRSS_SET_CURSOR_INFO SetCursorInfoRequest;
-
- CSRSS_FLUSH_INPUT_BUFFER FlushInputBufferRequest;
+ CSRSS_CURSOR_INFO CursorInfoRequest;
+ CSRSS_SET_CURSOR_POSITION SetCursorPositionRequest;
/* Screen buffer */
CSRSS_CREATE_SCREEN_BUFFER CreateScreenBufferRequest;
@@ -599,6 +590,7 @@
CSRSS_SCROLL_CONSOLE_SCREEN_BUFFER ScrollConsoleScreenBufferRequest;
CSRSS_GET_CONSOLE_SELECTION_INFO GetConsoleSelectionInfo;
+ CSRSS_FLUSH_INPUT_BUFFER FlushInputBufferRequest;
/* Console mode */
CSRSS_CONSOLE_MODE ConsoleModeRequest;
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] Sat Nov 17 23:29:53
2012
@@ -1092,18 +1092,16 @@
CSR_API(SrvGetConsoleCursorInfo)
{
NTSTATUS Status;
- PCSRSS_GET_CURSOR_INFO GetCursorInfoRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetCursorInfoRequest;
+ PCSRSS_CURSOR_INFO CursorInfoRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.CursorInfoRequest;
PCSRSS_SCREEN_BUFFER Buff;
DPRINT("SrvGetConsoleCursorInfo\n");
- Status = ConioLockScreenBuffer(CsrGetClientThread()->Process,
GetCursorInfoRequest->ConsoleHandle, &Buff, GENERIC_READ);
- if (! NT_SUCCESS(Status))
- {
- return Status;
- }
- GetCursorInfoRequest->Info.bVisible = Buff->CursorInfo.bVisible;
- GetCursorInfoRequest->Info.dwSize = Buff->CursorInfo.dwSize;
+ Status =
ConioLockScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
CursorInfoRequest->ConsoleHandle, &Buff, GENERIC_READ);
+ if (!NT_SUCCESS(Status)) return Status;
+
+ CursorInfoRequest->Info.bVisible = Buff->CursorInfo.bVisible;
+ CursorInfoRequest->Info.dwSize = Buff->CursorInfo.dwSize;
ConioUnlockScreenBuffer(Buff);
return STATUS_SUCCESS;
@@ -1111,24 +1109,22 @@
CSR_API(SrvSetConsoleCursorInfo)
{
- PCSRSS_SET_CURSOR_INFO SetCursorInfoRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetCursorInfoRequest;
+ NTSTATUS Status;
+ PCSRSS_CURSOR_INFO CursorInfoRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.CursorInfoRequest;
PCSRSS_CONSOLE Console;
PCSRSS_SCREEN_BUFFER Buff;
DWORD Size;
BOOL Visible;
- NTSTATUS Status;
DPRINT("SrvSetConsoleCursorInfo\n");
- Status = ConioLockScreenBuffer(CsrGetClientThread()->Process,
SetCursorInfoRequest->ConsoleHandle, &Buff, GENERIC_WRITE);
- if (! NT_SUCCESS(Status))
- {
- return Status;
- }
+ Status =
ConioLockScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
CursorInfoRequest->ConsoleHandle, &Buff, GENERIC_WRITE);
+ if (!NT_SUCCESS(Status)) return Status;
+
Console = Buff->Header.Console;
- Size = SetCursorInfoRequest->Info.dwSize;
- Visible = SetCursorInfoRequest->Info.bVisible;
+ Size = CursorInfoRequest->Info.dwSize;
+ Visible = CursorInfoRequest->Info.bVisible;
if (Size < 1)
{
Size = 1;
@@ -1138,13 +1134,14 @@
Size = 100;
}
- if (Size != Buff->CursorInfo.dwSize
- || (Visible && ! Buff->CursorInfo.bVisible) || (! Visible
&& Buff->CursorInfo.bVisible))
+ if ( (Size != Buff->CursorInfo.dwSize) ||
+ (Visible && ! Buff->CursorInfo.bVisible) ||
+ (! Visible && Buff->CursorInfo.bVisible) )
{
Buff->CursorInfo.dwSize = Size;
Buff->CursorInfo.bVisible = Visible;
- if (! ConioSetCursorInfo(Console, Buff))
+ if (!ConioSetCursorInfo(Console, Buff))
{
ConioUnlockScreenBuffer(Buff);
return STATUS_UNSUCCESSFUL;
@@ -1159,7 +1156,7 @@
CSR_API(SrvSetConsoleCursorPosition)
{
NTSTATUS Status;
- PCSRSS_SET_CURSOR SetCursorRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetCursorRequest;
+ PCSRSS_SET_CURSOR_POSITION SetCursorPositionRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetCursorPositionRequest;
PCSRSS_CONSOLE Console;
PCSRSS_SCREEN_BUFFER Buff;
LONG OldCursorX, OldCursorY;
@@ -1167,17 +1164,15 @@
DPRINT("SrvSetConsoleCursorPosition\n");
- Status = ConioLockScreenBuffer(CsrGetClientThread()->Process,
SetCursorRequest->ConsoleHandle, &Buff, GENERIC_WRITE);
- if (! NT_SUCCESS(Status))
- {
- return Status;
- }
+ Status =
ConioLockScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
SetCursorPositionRequest->ConsoleHandle, &Buff, GENERIC_WRITE);
+ if (!NT_SUCCESS(Status)) return Status;
+
Console = Buff->Header.Console;
- NewCursorX = SetCursorRequest->Position.X;
- NewCursorY = SetCursorRequest->Position.Y;
- if (NewCursorX < 0 || NewCursorX >= Buff->MaxX ||
- NewCursorY < 0 || NewCursorY >= Buff->MaxY)
+ NewCursorX = SetCursorPositionRequest->Position.X;
+ NewCursorY = SetCursorPositionRequest->Position.Y;
+ if ( NewCursorX < 0 || NewCursorX >= Buff->MaxX ||
+ NewCursorY < 0 || NewCursorY >= Buff->MaxY )
{
ConioUnlockScreenBuffer(Buff);
return STATUS_INVALID_PARAMETER;