Author: hbelusca
Date: Sat Mar 8 15:31:05 2014
New Revision: 62460
URL:
http://svn.reactos.org/svn/reactos?rev=62460&view=rev
Log:
[KERNEL32][CONSRV]
Make kernel32 / winsrv console CSR structures Win2k3-compliant.
The aim is to be able to put our kernel32.dll or winsrv.dll on win2k3, and vice-versa.
Most of the changes consist in:
- adding a HANDLE ConsoleHandle; to the structures, representing the console handle of the
current application;
- reorganizing the order of the members in the different structures;
- few structures need to hold a event handle because it appears that some APIs create a
event handle to perform some sort of synchronization with the console server (this is
totally unused at the moment).
- Since CsrClientCallServer returns the value of ApiMessage.Status, then just use
ApiMessage.Status instead of declaring another Status variable for querying the return
value of CsrClientCallServer.
Part 1/X
Aside:
The VerifyConsoleIoHandle winetest problem is solved here (see CORE-7941 for more
details).
CORE-7941 #resolved #comment Fixed in revision 62460, thanks :)
CORE-7931
Modified:
trunk/reactos/dll/win32/kernel32/client/console/console.c
trunk/reactos/include/psdk/wincon.h
trunk/reactos/include/reactos/subsys/win/conmsg.h
trunk/reactos/win32ss/user/winsrv/consrv/condrv/console.c
trunk/reactos/win32ss/user/winsrv/consrv/condrv/dummyfrontend.c
trunk/reactos/win32ss/user/winsrv/consrv/condrv/text.c
trunk/reactos/win32ss/user/winsrv/consrv/conoutput.c
trunk/reactos/win32ss/user/winsrv/consrv/console.c
trunk/reactos/win32ss/user/winsrv/consrv/frontendctl.c
trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guisettings.h
trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
trunk/reactos/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c
trunk/reactos/win32ss/user/winsrv/consrv/handle.c
trunk/reactos/win32ss/user/winsrv/consrv/include/conio.h
trunk/reactos/win32ss/user/winsrv/consrv/include/term.h
Modified: trunk/reactos/dll/win32/kernel32/client/console/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/console/console.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/console/console.c [iso-8859-1] Sat Mar 8
15:31:05 2014
@@ -252,17 +252,18 @@
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_MENUCONTROL MenuControlRequest = &ApiMessage.Data.MenuControlRequest;
- MenuControlRequest->OutputHandle = hConsoleOutput;
- MenuControlRequest->dwCmdIdLow = dwCmdIdLow;
- MenuControlRequest->dwCmdIdHigh = dwCmdIdHigh;
- MenuControlRequest->hMenu = NULL;
+ MenuControlRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ MenuControlRequest->OutputHandle = hConsoleOutput;
+ MenuControlRequest->CmdIdLow = dwCmdIdLow;
+ MenuControlRequest->CmdIdHigh = dwCmdIdHigh;
+ MenuControlRequest->MenuHandle = NULL;
CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
NULL,
CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepMenuControl),
- sizeof(CONSOLE_MENUCONTROL));
-
- return MenuControlRequest->hMenu;
+ sizeof(*MenuControlRequest));
+
+ return MenuControlRequest->MenuHandle;
}
@@ -314,7 +315,6 @@
WINAPI
GetConsoleDisplayMode(LPDWORD lpModeFlags)
{
- NTSTATUS Status;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_GETDISPLAYMODE GetDisplayModeRequest =
&ApiMessage.Data.GetDisplayModeRequest;
@@ -324,19 +324,19 @@
return FALSE;
}
- // GetDisplayModeRequest->OutputHandle = hConsoleOutput;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetDisplayMode),
- sizeof(CONSOLE_GETDISPLAYMODE));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
- return FALSE;
- }
-
- *lpModeFlags = GetDisplayModeRequest->DisplayMode;
+ GetDisplayModeRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetDisplayMode),
+ sizeof(*GetDisplayModeRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
+ return FALSE;
+ }
+
+ *lpModeFlags = GetDisplayModeRequest->DisplayMode; // ModeFlags
return TRUE;
}
@@ -378,33 +378,34 @@
BOOL
WINAPI
GetConsoleHardwareState(HANDLE hConsoleOutput,
- DWORD Flags,
+ PDWORD Flags,
PDWORD State)
{
- NTSTATUS Status;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_GETSETHWSTATE HardwareStateRequest =
&ApiMessage.Data.HardwareStateRequest;
DPRINT1("GetConsoleHardwareState(%lu, 0x%p) UNIMPLEMENTED!\n", Flags,
State);
- if (State == NULL)
+ if (Flags == NULL || State == NULL)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
- HardwareStateRequest->OutputHandle = hConsoleOutput;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetHardwareState),
- sizeof(CONSOLE_GETSETHWSTATE));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
- return FALSE;
- }
-
+ HardwareStateRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ HardwareStateRequest->OutputHandle = hConsoleOutput;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetHardwareState),
+ sizeof(*HardwareStateRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
+ return FALSE;
+ }
+
+ *Flags = HardwareStateRequest->Flags;
*State = HardwareStateRequest->State;
return TRUE;
}
@@ -458,7 +459,6 @@
InvalidateConsoleDIBits(IN HANDLE hConsoleOutput,
IN PSMALL_RECT lpRect)
{
- NTSTATUS Status;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_INVALIDATEDIBITS InvalidateDIBitsRequest =
&ApiMessage.Data.InvalidateDIBitsRequest;
@@ -468,16 +468,17 @@
return FALSE;
}
- InvalidateDIBitsRequest->OutputHandle = hConsoleOutput;
- InvalidateDIBitsRequest->Region = *lpRect;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepInvalidateBitMapRect),
- sizeof(CONSOLE_INVALIDATEDIBITS));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
+ InvalidateDIBitsRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ InvalidateDIBitsRequest->OutputHandle = hConsoleOutput;
+ InvalidateDIBitsRequest->Region = *lpRect;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepInvalidateBitMapRect),
+ sizeof(*InvalidateDIBitsRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
return FALSE;
}
@@ -546,23 +547,23 @@
*/
BOOL
WINAPI
-SetConsoleCursor(HANDLE hConsoleOutput,
+SetConsoleCursor(HANDLE hConsoleOutput,
HCURSOR hCursor)
{
- NTSTATUS Status;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_SETCURSOR SetCursorRequest = &ApiMessage.Data.SetCursorRequest;
- SetCursorRequest->OutputHandle = hConsoleOutput;
- SetCursorRequest->hCursor = hCursor;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetCursor),
- sizeof(CONSOLE_SETCURSOR));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
+ SetCursorRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ SetCursorRequest->OutputHandle = hConsoleOutput;
+ SetCursorRequest->CursorHandle = hCursor;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetCursor),
+ sizeof(*SetCursorRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
return FALSE;
}
@@ -576,25 +577,26 @@
BOOL
WINAPI
SetConsoleDisplayMode(HANDLE hConsoleOutput,
- DWORD dwFlags,
+ DWORD dwFlags, // dwModeFlags
PCOORD lpNewScreenBufferDimensions)
{
- NTSTATUS Status;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_SETDISPLAYMODE SetDisplayModeRequest =
&ApiMessage.Data.SetDisplayModeRequest;
- SetDisplayModeRequest->OutputHandle = hConsoleOutput;
- SetDisplayModeRequest->DisplayMode = dwFlags;
- SetDisplayModeRequest->NewSBDim.X = 0;
- SetDisplayModeRequest->NewSBDim.Y = 0;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetDisplayMode),
- sizeof(CONSOLE_SETDISPLAYMODE));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
+ SetDisplayModeRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ SetDisplayModeRequest->OutputHandle = hConsoleOutput;
+ SetDisplayModeRequest->DisplayMode = dwFlags; // ModeFlags ; dwModeFlags
+ SetDisplayModeRequest->NewSBDim.X = 0;
+ SetDisplayModeRequest->NewSBDim.Y = 0;
+ /* SetDisplayModeRequest->EventHandle; */
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetDisplayMode),
+ sizeof(*SetDisplayModeRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
return FALSE;
}
@@ -628,22 +630,23 @@
DWORD Flags,
DWORD State)
{
- NTSTATUS Status;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_GETSETHWSTATE HardwareStateRequest =
&ApiMessage.Data.HardwareStateRequest;
DPRINT1("SetConsoleHardwareState(%lu, %lu) UNIMPLEMENTED!\n", Flags,
State);
- HardwareStateRequest->OutputHandle = hConsoleOutput;
- HardwareStateRequest->State = State;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetHardwareState),
- sizeof(CONSOLE_GETSETHWSTATE));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
+ HardwareStateRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ HardwareStateRequest->OutputHandle = hConsoleOutput;
+ HardwareStateRequest->Flags = Flags;
+ HardwareStateRequest->State = State;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetHardwareState),
+ sizeof(*HardwareStateRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
return FALSE;
}
@@ -690,19 +693,19 @@
WINAPI
SetConsoleMenuClose(BOOL bEnable)
{
- NTSTATUS Status;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_SETMENUCLOSE SetMenuCloseRequest =
&ApiMessage.Data.SetMenuCloseRequest;
- SetMenuCloseRequest->Enable = bEnable;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetMenuClose),
- sizeof(CONSOLE_SETMENUCLOSE));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
+ SetMenuCloseRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ SetMenuCloseRequest->Enable = bEnable;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetMenuClose),
+ sizeof(*SetMenuCloseRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
return FALSE;
}
@@ -721,21 +724,21 @@
HPALETTE hPalette,
UINT dwUsage)
{
- NTSTATUS Status;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_SETPALETTE SetPaletteRequest = &ApiMessage.Data.SetPaletteRequest;
+ SetPaletteRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
SetPaletteRequest->OutputHandle = hConsoleOutput;
SetPaletteRequest->PaletteHandle = hPalette;
SetPaletteRequest->Usage = dwUsage;
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetPalette),
- sizeof(CONSOLE_SETPALETTE));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetPalette),
+ sizeof(*SetPaletteRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
return FALSE;
}
@@ -754,14 +757,15 @@
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_SHOWCURSOR ShowCursorRequest = &ApiMessage.Data.ShowCursorRequest;
- ShowCursorRequest->OutputHandle = hConsoleOutput;
- ShowCursorRequest->Show = bShow;
- ShowCursorRequest->RefCount = 0;
+ ShowCursorRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ ShowCursorRequest->OutputHandle = hConsoleOutput;
+ ShowCursorRequest->Show = bShow;
+ ShowCursorRequest->RefCount = 0;
CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
NULL,
CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepShowCursor),
- sizeof(CONSOLE_SHOWCURSOR));
+ sizeof(*ShowCursorRequest));
return ShowCursorRequest->RefCount;
}
@@ -771,10 +775,10 @@
* FUNCTION: Checks whether the given handle is a valid console handle.
*
* ARGUMENTS:
- * Handle - Handle to be checked
+ * hIoHandle - Handle to be checked.
*
* RETURNS:
- * TRUE: Handle is a valid console handle
+ * TRUE : Handle is a valid console handle.
* FALSE: Handle is not a valid console handle.
*
* STATUS: Officially undocumented
@@ -783,24 +787,29 @@
*/
BOOL
WINAPI
-VerifyConsoleIoHandle(HANDLE Handle)
-{
- NTSTATUS Status;
- CONSOLE_API_MESSAGE ApiMessage;
-
- ApiMessage.Data.VerifyHandleRequest.ConsoleHandle = Handle;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepVerifyIoHandle),
- sizeof(CONSOLE_VERIFYHANDLE));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
- return FALSE;
- }
-
- return TRUE;
+VerifyConsoleIoHandle(HANDLE hIoHandle)
+{
+ CONSOLE_API_MESSAGE ApiMessage;
+ PCONSOLE_VERIFYHANDLE VerifyHandleRequest =
&ApiMessage.Data.VerifyHandleRequest;
+
+ VerifyHandleRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ VerifyHandleRequest->Handle = hIoHandle;
+ VerifyHandleRequest->IsValid = FALSE;
+
+ /* If the process is not attached to a console, return invalid handle */
+ if (VerifyHandleRequest->ConsoleHandle == NULL) return FALSE;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepVerifyIoHandle),
+ sizeof(*VerifyHandleRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
+ return FALSE;
+ }
+
+ return VerifyHandleRequest->IsValid;
}
@@ -809,20 +818,21 @@
*/
BOOL
WINAPI
-CloseConsoleHandle(HANDLE Handle)
-{
- NTSTATUS Status;
- CONSOLE_API_MESSAGE ApiMessage;
-
- ApiMessage.Data.CloseHandleRequest.ConsoleHandle = Handle;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepCloseHandle),
- sizeof(CONSOLE_CLOSEHANDLE));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
+CloseConsoleHandle(HANDLE hHandle)
+{
+ CONSOLE_API_MESSAGE ApiMessage;
+ PCONSOLE_CLOSEHANDLE CloseHandleRequest = &ApiMessage.Data.CloseHandleRequest;
+
+ CloseHandleRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ CloseHandleRequest->Handle = hHandle;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepCloseHandle),
+ sizeof(*CloseHandleRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
return FALSE;
}
@@ -848,30 +858,36 @@
*/
{
PRTL_USER_PROCESS_PARAMETERS Ppb = NtCurrentPeb()->ProcessParameters;
+ HANDLE Handle = INVALID_HANDLE_VALUE;
switch (nStdHandle)
{
case STD_INPUT_HANDLE:
- return Ppb->StandardInput;
+ Handle = Ppb->StandardInput;
+ break;
case STD_OUTPUT_HANDLE:
- return Ppb->StandardOutput;
+ Handle = Ppb->StandardOutput;
+ break;
case STD_ERROR_HANDLE:
- return Ppb->StandardError;
- }
-
- SetLastError(ERROR_INVALID_HANDLE);
- return INVALID_HANDLE_VALUE;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-SetStdHandle(DWORD nStdHandle,
+ Handle = Ppb->StandardError;
+ break;
+ }
+
+ /* If the returned handle is invalid, set last error */
+ if (Handle == INVALID_HANDLE_VALUE) SetLastError(ERROR_INVALID_HANDLE);
+
+ return Handle;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+SetStdHandle(DWORD nStdHandle,
HANDLE hHandle)
/*
* FUNCTION: Set the handle for the standard input, standard output or
@@ -886,7 +902,7 @@
{
PRTL_USER_PROCESS_PARAMETERS Ppb = NtCurrentPeb()->ProcessParameters;
- /* no need to check if hHandle == INVALID_HANDLE_VALUE */
+ /* No need to check if hHandle == INVALID_HANDLE_VALUE */
switch (nStdHandle)
{
@@ -903,7 +919,7 @@
return TRUE;
}
- /* Windows for whatever reason sets the last error to ERROR_INVALID_HANDLE here */
+ /* nStdHandle was invalid, bail out */
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
@@ -1021,8 +1037,8 @@
GetConsoleScreenBufferInfo(HANDLE hConsoleOutput,
PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo)
{
- NTSTATUS Status;
- CONSOLE_API_MESSAGE ApiMessage;
+ CONSOLE_API_MESSAGE ApiMessage;
+ PCONSOLE_GETSCREENBUFFERINFO ScreenBufferInfoRequest =
&ApiMessage.Data.ScreenBufferInfoRequest;
if (lpConsoleScreenBufferInfo == NULL)
{
@@ -1030,19 +1046,27 @@
return FALSE;
}
- ApiMessage.Data.ScreenBufferInfoRequest.OutputHandle = hConsoleOutput;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetScreenBufferInfo),
- sizeof(CONSOLE_GETSCREENBUFFERINFO));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
- return FALSE;
- }
-
- *lpConsoleScreenBufferInfo = ApiMessage.Data.ScreenBufferInfoRequest.Info;
+ ScreenBufferInfoRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ ScreenBufferInfoRequest->OutputHandle = hConsoleOutput;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetScreenBufferInfo),
+ sizeof(*ScreenBufferInfoRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
+ return FALSE;
+ }
+
+ lpConsoleScreenBufferInfo->dwSize =
ScreenBufferInfoRequest->ScreenBufferSize;
+ lpConsoleScreenBufferInfo->dwCursorPosition =
ScreenBufferInfoRequest->CursorPosition;
+ lpConsoleScreenBufferInfo->wAttributes =
ScreenBufferInfoRequest->Attributes;
+ lpConsoleScreenBufferInfo->srWindow.Left =
ScreenBufferInfoRequest->ViewOrigin.X;
+ lpConsoleScreenBufferInfo->srWindow.Top =
ScreenBufferInfoRequest->ViewOrigin.Y;
+ lpConsoleScreenBufferInfo->srWindow.Right =
ScreenBufferInfoRequest->ViewOrigin.X + ScreenBufferInfoRequest->ViewSize.X - 1;
+ lpConsoleScreenBufferInfo->srWindow.Bottom =
ScreenBufferInfoRequest->ViewOrigin.Y + ScreenBufferInfoRequest->ViewSize.Y - 1;
+ lpConsoleScreenBufferInfo->dwMaximumWindowSize =
ScreenBufferInfoRequest->MaximumViewSize;
return TRUE;
}
@@ -1932,21 +1956,24 @@
WINAPI
GetConsoleCP(VOID)
{
- NTSTATUS Status;
- CONSOLE_API_MESSAGE ApiMessage;
+ CONSOLE_API_MESSAGE ApiMessage;
+ PCONSOLE_GETINPUTOUTPUTCP GetConsoleCPRequest =
&ApiMessage.Data.GetConsoleCPRequest;
/* Get the Input Code Page */
- ApiMessage.Data.ConsoleCPRequest.InputCP = TRUE;
- ApiMessage.Data.ConsoleCPRequest.CodePage = 0;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetCP),
- sizeof(CONSOLE_GETSETINPUTOUTPUTCP));
-
- if (!NT_SUCCESS(Status)) BaseSetLastNTError(Status);
-
- return ApiMessage.Data.ConsoleCPRequest.CodePage;
+ GetConsoleCPRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ GetConsoleCPRequest->OutputCP = FALSE;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepGetCP),
+ sizeof(*GetConsoleCPRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
+ return 0;
+ }
+
+ return GetConsoleCPRequest->CodePage;
}
@@ -1959,21 +1986,26 @@
WINAPI
SetConsoleCP(UINT wCodePageID)
{
- NTSTATUS Status;
- CONSOLE_API_MESSAGE ApiMessage;
+ CONSOLE_API_MESSAGE ApiMessage;
+ PCONSOLE_SETINPUTOUTPUTCP SetConsoleCPRequest =
&ApiMessage.Data.SetConsoleCPRequest;
/* Set the Input Code Page */
- ApiMessage.Data.ConsoleCPRequest.InputCP = TRUE;
- ApiMessage.Data.ConsoleCPRequest.CodePage = wCodePageID;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetCP),
- sizeof(CONSOLE_GETSETINPUTOUTPUTCP));
-
- if (!NT_SUCCESS(Status)) BaseSetLastNTError(Status);
-
- return NT_SUCCESS(Status);
+ SetConsoleCPRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ SetConsoleCPRequest->CodePage = wCodePageID;
+ SetConsoleCPRequest->OutputCP = FALSE;
+ /* SetConsoleCPRequest->EventHandle; */
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepSetCP),
+ sizeof(*SetConsoleCPRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
+ return FALSE;
+ }
+
+ return TRUE;
}
@@ -1986,21 +2018,24 @@
WINAPI
GetConsoleOutputCP(VOID)
{
- NTSTATUS Status;
- CONSOLE_API_MESSAGE ApiMessage;
+ CONSOLE_API_MESSAGE ApiMessage;
+ PCONSOLE_GETINPUTOUTPUTCP GetConsoleCPRequest =
&ApiMessage.Data.GetConsoleCPRequest;
/* Get the Output Code Page */
- ApiMessage.Data.ConsoleCPRequest.InputCP = FALSE;
- ApiMessage.Data.ConsoleCPRequest.CodePage = 0;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetCP),
- sizeof(CONSOLE_GETSETINPUTOUTPUTCP));
-
- if (!NT_SUCCESS(Status)) BaseSetLastNTError(Status);
-
- return ApiMessage.Data.ConsoleCPRequest.CodePage;
+ GetConsoleCPRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ GetConsoleCPRequest->OutputCP = TRUE;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepGetCP),
+ sizeof(*GetConsoleCPRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
+ return 0;
+ }
+
+ return GetConsoleCPRequest->CodePage;
}
@@ -2013,21 +2048,26 @@
WINAPI
SetConsoleOutputCP(UINT wCodePageID)
{
- NTSTATUS Status;
- CONSOLE_API_MESSAGE ApiMessage;
+ CONSOLE_API_MESSAGE ApiMessage;
+ PCONSOLE_SETINPUTOUTPUTCP SetConsoleCPRequest =
&ApiMessage.Data.SetConsoleCPRequest;
/* Set the Output Code Page */
- ApiMessage.Data.ConsoleCPRequest.InputCP = FALSE;
- ApiMessage.Data.ConsoleCPRequest.CodePage = wCodePageID;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetCP),
- sizeof(CONSOLE_GETSETINPUTOUTPUTCP));
-
- if (!NT_SUCCESS(Status)) BaseSetLastNTError(Status);
-
- return NT_SUCCESS(Status);
+ SetConsoleCPRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ SetConsoleCPRequest->CodePage = wCodePageID;
+ SetConsoleCPRequest->OutputCP = TRUE;
+ /* SetConsoleCPRequest->EventHandle; */
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepSetCP),
+ sizeof(*SetConsoleCPRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
+ return FALSE;
+ }
+
+ return TRUE;
}
@@ -2041,11 +2081,10 @@
GetConsoleProcessList(LPDWORD lpdwProcessList,
DWORD dwProcessCount)
{
- NTSTATUS Status;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_GETPROCESSLIST GetProcessListRequest =
&ApiMessage.Data.GetProcessListRequest;
PCSR_CAPTURE_BUFFER CaptureBuffer;
- ULONG nProcesses;
+ ULONG nProcesses = 0;
if (lpdwProcessList == NULL || dwProcessCount == 0)
{
@@ -2058,30 +2097,30 @@
{
DPRINT1("CsrAllocateCaptureBuffer failed!\n");
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return FALSE;
- }
-
- GetProcessListRequest->nMaxIds = dwProcessCount;
+ return 0;
+ }
+
+ GetProcessListRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ GetProcessListRequest->ProcessCount = dwProcessCount;
CsrAllocateMessagePointer(CaptureBuffer,
dwProcessCount * sizeof(DWORD),
- (PVOID*)&GetProcessListRequest->pProcessIds);
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- CaptureBuffer,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetProcessList),
- sizeof(CONSOLE_GETPROCESSLIST));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError (Status);
- nProcesses = 0;
+ (PVOID*)&GetProcessListRequest->ProcessIdsList);
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ CaptureBuffer,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetProcessList),
+ sizeof(*GetProcessListRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
}
else
{
- nProcesses = GetProcessListRequest->nProcessIdsTotal;
+ nProcesses = GetProcessListRequest->ProcessCount;
if (dwProcessCount >= nProcesses)
{
- memcpy(lpdwProcessList, GetProcessListRequest->pProcessIds, nProcesses *
sizeof(DWORD));
+ memcpy(lpdwProcessList, GetProcessListRequest->ProcessIdsList, nProcesses
* sizeof(DWORD));
}
}
@@ -2099,8 +2138,8 @@
WINAPI
GetConsoleSelectionInfo(PCONSOLE_SELECTION_INFO lpConsoleSelectionInfo)
{
- NTSTATUS Status;
- CONSOLE_API_MESSAGE ApiMessage;
+ CONSOLE_API_MESSAGE ApiMessage;
+ PCONSOLE_GETSELECTIONINFO GetSelectionInfoRequest =
&ApiMessage.Data.GetSelectionInfoRequest;
if (lpConsoleSelectionInfo == NULL)
{
@@ -2108,17 +2147,19 @@
return FALSE;
}
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetSelectionInfo),
- sizeof(CONSOLE_GETSELECTIONINFO));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
- return FALSE;
- }
-
- *lpConsoleSelectionInfo = ApiMessage.Data.GetSelectionInfoRequest.Info;
+ GetSelectionInfoRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetSelectionInfo),
+ sizeof(*GetSelectionInfoRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
+ return FALSE;
+ }
+
+ *lpConsoleSelectionInfo = GetSelectionInfoRequest->Info;
return TRUE;
}
@@ -2183,20 +2224,22 @@
WINAPI
GetConsoleWindow(VOID)
{
- NTSTATUS Status;
- CONSOLE_API_MESSAGE ApiMessage;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetConsoleWindow),
- sizeof(CONSOLE_GETWINDOW));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
+ CONSOLE_API_MESSAGE ApiMessage;
+ PCONSOLE_GETWINDOW GetWindowRequest = &ApiMessage.Data.GetWindowRequest;
+
+ GetWindowRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepGetConsoleWindow),
+ sizeof(*GetWindowRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
return (HWND)NULL;
}
- return ApiMessage.Data.GetWindowRequest.WindowHandle;
+ return GetWindowRequest->WindowHandle;
}
@@ -2207,24 +2250,25 @@
*/
BOOL
WINAPI
-SetConsoleIcon(HICON hicon)
-{
- NTSTATUS Status;
- CONSOLE_API_MESSAGE ApiMessage;
-
- ApiMessage.Data.SetIconRequest.WindowIcon = hicon;
-
- Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
- NULL,
- CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX,
ConsolepSetIcon),
- sizeof(CONSOLE_SETICON));
- if (!NT_SUCCESS(Status))
- {
- BaseSetLastNTError(Status);
- return FALSE;
- }
-
- return NT_SUCCESS(Status);
+SetConsoleIcon(HICON hIcon)
+{
+ CONSOLE_API_MESSAGE ApiMessage;
+ PCONSOLE_SETICON SetIconRequest = &ApiMessage.Data.SetIconRequest;
+
+ SetIconRequest->ConsoleHandle =
NtCurrentPeb()->ProcessParameters->ConsoleHandle;
+ SetIconRequest->IconHandle = hIcon;
+
+ CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
+ NULL,
+ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepSetIcon),
+ sizeof(*SetIconRequest));
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ BaseSetLastNTError(ApiMessage.Status);
+ return FALSE;
+ }
+
+ return TRUE;
}
Modified: trunk/reactos/include/psdk/wincon.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wincon.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/wincon.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/wincon.h [iso-8859-1] Sat Mar 8 15:31:05 2014
@@ -427,10 +427,10 @@
#if (_WIN32_WINNT >= 0x0500)
HWND WINAPI GetConsoleWindow(VOID);
-BOOL APIENTRY GetConsoleDisplayMode(_Out_ LPDWORD lpModeFlags);
-
-BOOL
-APIENTRY
+BOOL WINAPI GetConsoleDisplayMode(_Out_ LPDWORD lpModeFlags);
+
+BOOL
+WINAPI
SetConsoleDisplayMode(
_In_ HANDLE hConsoleOutput,
_In_ DWORD dwFlags,
@@ -607,8 +607,16 @@
BOOL WINAPI SetConsoleCursor(_In_ HANDLE, _In_ HCURSOR);
/* Undocumented, see
http://undoc.airesoft.co.uk/kernel32.dll/ShowConsoleCursor.php */
INT WINAPI ShowConsoleCursor(_In_ HANDLE, _In_ BOOL);
+/* Undocumented */
+BOOL WINAPI SetConsoleIcon(_In_ HICON);
/* Undocumented, see
http://comments.gmane.org/gmane.comp.lang.harbour.devel/27844 */
BOOL WINAPI SetConsolePalette(_In_ HANDLE, _In_ HPALETTE, _In_ UINT);
+/* Undocumented */
+BOOL WINAPI CloseConsoleHandle(_In_ HANDLE);
+// HANDLE WINAPI GetStdHandle(_In_ DWORD);
+// BOOL WINAPI SetStdHandle(_In_ DWORD, _In_ HANDLE);
+/* Undocumented */
+BOOL WINAPI VerifyConsoleIoHandle(_In_ HANDLE);
BOOL
WINAPI
Modified: trunk/reactos/include/reactos/subsys/win/conmsg.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/win…
==============================================================================
--- trunk/reactos/include/reactos/subsys/win/conmsg.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/subsys/win/conmsg.h [iso-8859-1] Sat Mar 8 15:31:05
2014
@@ -197,9 +197,9 @@
typedef struct
{
- ULONG nMaxIds;
- ULONG nProcessIdsTotal;
- PDWORD pProcessIds;
+ HANDLE ConsoleHandle;
+ ULONG ProcessCount;
+ PDWORD ProcessIdsList;
} CONSOLE_GETPROCESSLIST, *PCONSOLE_GETPROCESSLIST;
typedef struct
@@ -262,8 +262,14 @@
typedef struct
{
- HANDLE OutputHandle;
- CONSOLE_SCREEN_BUFFER_INFO Info;
+ HANDLE ConsoleHandle;
+ HANDLE OutputHandle;
+ COORD ScreenBufferSize;
+ COORD CursorPosition;
+ COORD ViewOrigin;
+ WORD Attributes;
+ COORD ViewSize;
+ COORD MaximumViewSize;
} CONSOLE_GETSCREENBUFFERINFO, *PCONSOLE_GETSCREENBUFFERINFO;
typedef struct
@@ -274,6 +280,7 @@
typedef struct
{
+ HANDLE ConsoleHandle;
HANDLE OutputHandle;
BOOL Show;
INT RefCount;
@@ -281,8 +288,9 @@
typedef struct
{
+ HANDLE ConsoleHandle;
HANDLE OutputHandle;
- HCURSOR hCursor;
+ HCURSOR CursorHandle;
} CONSOLE_SETCURSOR, *PCONSOLE_SETCURSOR;
typedef struct
@@ -305,15 +313,17 @@
typedef struct
{
- // HANDLE OutputHandle;
- DWORD DisplayMode;
+ HANDLE ConsoleHandle;
+ DWORD DisplayMode; // ModeFlags
} CONSOLE_GETDISPLAYMODE, *PCONSOLE_GETDISPLAYMODE;
typedef struct
{
- HANDLE OutputHandle;
- DWORD DisplayMode;
+ HANDLE ConsoleHandle;
+ HANDLE OutputHandle;
+ DWORD DisplayMode; // ModeFlags
COORD NewSBDim;
+ HANDLE EventHandle;
} CONSOLE_SETDISPLAYMODE, *PCONSOLE_SETDISPLAYMODE;
/*
@@ -324,7 +334,9 @@
typedef struct
{
- HANDLE OutputHandle;
+ HANDLE ConsoleHandle;
+ HANDLE OutputHandle;
+ DWORD Flags;
DWORD State;
} CONSOLE_GETSETHWSTATE, *PCONSOLE_GETSETHWSTATE;
@@ -351,12 +363,14 @@
typedef struct
{
+ HANDLE ConsoleHandle;
HANDLE OutputHandle;
SMALL_RECT Region;
} CONSOLE_INVALIDATEDIBITS, *PCONSOLE_INVALIDATEDIBITS;
typedef struct
{
+ HANDLE ConsoleHandle;
HANDLE OutputHandle;
HPALETTE PaletteHandle;
UINT Usage;
@@ -501,11 +515,14 @@
typedef struct
{
HANDLE ConsoleHandle;
+ HANDLE Handle;
} CONSOLE_CLOSEHANDLE, *PCONSOLE_CLOSEHANDLE;
typedef struct
{
- HANDLE ConsoleHandle;
+ BOOL IsValid;
+ HANDLE ConsoleHandle;
+ HANDLE Handle;
} CONSOLE_VERIFYHANDLE, *PCONSOLE_VERIFYHANDLE;
typedef struct
@@ -543,15 +560,17 @@
typedef struct
{
- HANDLE OutputHandle;
- DWORD dwCmdIdLow;
- DWORD dwCmdIdHigh;
- HMENU hMenu;
+ HANDLE ConsoleHandle;
+ HANDLE OutputHandle;
+ DWORD CmdIdLow;
+ DWORD CmdIdHigh;
+ HMENU MenuHandle;
} CONSOLE_MENUCONTROL, *PCONSOLE_MENUCONTROL;
typedef struct
{
- BOOL Enable;
+ HANDLE ConsoleHandle;
+ BOOL Enable;
} CONSOLE_SETMENUCLOSE, *PCONSOLE_SETMENUCLOSE;
typedef struct
@@ -564,12 +583,14 @@
typedef struct
{
- HWND WindowHandle;
+ HANDLE ConsoleHandle;
+ HWND WindowHandle;
} CONSOLE_GETWINDOW, *PCONSOLE_GETWINDOW;
typedef struct
{
- HICON WindowIcon;
+ HANDLE ConsoleHandle;
+ HICON IconHandle;
} CONSOLE_SETICON, *PCONSOLE_SETICON;
@@ -665,14 +686,24 @@
typedef struct
{
+ HANDLE ConsoleHandle;
CONSOLE_SELECTION_INFO Info;
} CONSOLE_GETSELECTIONINFO, *PCONSOLE_GETSELECTIONINFO;
typedef struct
{
- BOOL InputCP; // TRUE : Input Code Page ; FALSE : Output Code Page
- UINT CodePage;
-} CONSOLE_GETSETINPUTOUTPUTCP, *PCONSOLE_GETSETINPUTOUTPUTCP;
+ HANDLE ConsoleHandle;
+ UINT CodePage;
+ BOOL OutputCP; // TRUE : Output Code Page ; FALSE : Input Code Page
+} CONSOLE_GETINPUTOUTPUTCP, *PCONSOLE_GETINPUTOUTPUTCP;
+
+typedef struct
+{
+ HANDLE ConsoleHandle;
+ UINT CodePage;
+ BOOL OutputCP; // TRUE : Output Code Page ; FALSE : Input Code Page
+ HANDLE EventHandle;
+} CONSOLE_SETINPUTOUTPUTCP, *PCONSOLE_SETINPUTOUTPUTCP;
typedef struct _CONSOLE_API_MESSAGE
{
@@ -764,7 +795,8 @@
CONSOLE_GETNUMINPUTEVENTS GetNumInputEventsRequest;
/* Input and Output Code Pages */
- CONSOLE_GETSETINPUTOUTPUTCP ConsoleCPRequest;
+ CONSOLE_GETINPUTOUTPUTCP GetConsoleCPRequest;
+ CONSOLE_SETINPUTOUTPUTCP SetConsoleCPRequest;
} Data;
} CONSOLE_API_MESSAGE, *PCONSOLE_API_MESSAGE;
Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/condrv/console.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/console.c [iso-8859-1] Sat Mar 8
15:31:05 2014
@@ -1007,12 +1007,12 @@
NTSTATUS NTAPI
ConDrvGetConsoleCP(IN PCONSOLE Console,
OUT PUINT CodePage,
- IN BOOLEAN InputCP)
+ IN BOOLEAN OutputCP)
{
if (Console == NULL || CodePage == NULL)
return STATUS_INVALID_PARAMETER;
- *CodePage = (InputCP ? Console->CodePage : Console->OutputCodePage);
+ *CodePage = (OutputCP ? Console->OutputCodePage : Console->CodePage);
return STATUS_SUCCESS;
}
@@ -1020,15 +1020,15 @@
NTSTATUS NTAPI
ConDrvSetConsoleCP(IN PCONSOLE Console,
IN UINT CodePage,
- IN BOOLEAN InputCP)
+ IN BOOLEAN OutputCP)
{
if (Console == NULL || !IsValidCodePage(CodePage))
return STATUS_INVALID_PARAMETER;
- if (InputCP)
+ if (OutputCP)
+ Console->OutputCodePage = CodePage;
+ else
Console->CodePage = CodePage;
- else
- Console->OutputCodePage = CodePage;
return STATUS_SUCCESS;
}
Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/dummyfrontend.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/condrv/dummyfrontend.c [iso-8859-1]
(original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/dummyfrontend.c [iso-8859-1] Sat Mar
8 15:31:05 2014
@@ -99,7 +99,7 @@
static BOOL NTAPI
DummyChangeIcon(IN OUT PFRONTEND This,
- HICON hWindowIcon)
+ HICON IconHandle)
{
return TRUE;
}
@@ -146,15 +146,15 @@
static BOOL NTAPI
DummySetMouseCursor(IN OUT PFRONTEND This,
- HCURSOR hCursor)
+ HCURSOR CursorHandle)
{
return TRUE;
}
static HMENU NTAPI
DummyMenuControl(IN OUT PFRONTEND This,
- UINT cmdIdLow,
- UINT cmdIdHigh)
+ UINT CmdIdLow,
+ UINT CmdIdHigh)
{
return NULL;
}
Modified: trunk/reactos/win32ss/user/winsrv/consrv/condrv/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1] Sat Mar 8
15:31:05 2014
@@ -1153,26 +1153,33 @@
}
NTSTATUS NTAPI
-ConDrvGetConsoleScreenBufferInfo(IN PCONSOLE Console,
- IN PTEXTMODE_SCREEN_BUFFER Buffer,
- OUT PCONSOLE_SCREEN_BUFFER_INFO ScreenBufferInfo)
-{
- if (Console == NULL || Buffer == NULL || ScreenBufferInfo == NULL)
+ConDrvGetConsoleScreenBufferInfo(IN PCONSOLE Console,
+ IN PTEXTMODE_SCREEN_BUFFER Buffer,
+ OUT PCOORD ScreenBufferSize,
+ OUT PCOORD CursorPosition,
+ OUT PCOORD ViewOrigin,
+ OUT PCOORD ViewSize,
+ OUT PCOORD MaximumViewSize,
+ OUT PWORD Attributes)
+{
+ if (Console == NULL || Buffer == NULL || ScreenBufferSize == NULL ||
+ CursorPosition == NULL || ViewOrigin == NULL || ViewSize == NULL ||
+ MaximumViewSize == NULL || Attributes == NULL)
+ {
return STATUS_INVALID_PARAMETER;
+ }
/* Validity check */
ASSERT(Console == Buffer->Header.Console);
- ScreenBufferInfo->dwSize = Buffer->ScreenBufferSize;
- ScreenBufferInfo->dwCursorPosition = Buffer->CursorPosition;
- ScreenBufferInfo->wAttributes = Buffer->ScreenDefaultAttrib;
- ScreenBufferInfo->srWindow.Left = Buffer->ViewOrigin.X;
- ScreenBufferInfo->srWindow.Top = Buffer->ViewOrigin.Y;
- ScreenBufferInfo->srWindow.Right = Buffer->ViewOrigin.X +
Buffer->ViewSize.X - 1;
- ScreenBufferInfo->srWindow.Bottom = Buffer->ViewOrigin.Y +
Buffer->ViewSize.Y - 1;
+ *ScreenBufferSize = Buffer->ScreenBufferSize;
+ *CursorPosition = Buffer->CursorPosition;
+ *ViewOrigin = Buffer->ViewOrigin;
+ *ViewSize = Buffer->ViewSize;
+ *Attributes = Buffer->ScreenDefaultAttrib;
// FIXME: Refine the computation
- ScreenBufferInfo->dwMaximumWindowSize = Buffer->ScreenBufferSize;
+ *MaximumViewSize = Buffer->ScreenBufferSize;
return STATUS_SUCCESS;
}
Modified: trunk/reactos/win32ss/user/winsrv/consrv/conoutput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/conoutput.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/conoutput.c [iso-8859-1] Sat Mar 8 15:31:05
2014
@@ -683,9 +683,14 @@
}
NTSTATUS NTAPI
-ConDrvGetConsoleScreenBufferInfo(IN PCONSOLE Console,
- IN PTEXTMODE_SCREEN_BUFFER Buffer,
- OUT PCONSOLE_SCREEN_BUFFER_INFO ScreenBufferInfo);
+ConDrvGetConsoleScreenBufferInfo(IN PCONSOLE Console,
+ IN PTEXTMODE_SCREEN_BUFFER Buffer,
+ OUT PCOORD ScreenBufferSize,
+ OUT PCOORD CursorPosition,
+ OUT PCOORD ViewOrigin,
+ OUT PCOORD ViewSize,
+ OUT PCOORD MaximumViewSize,
+ OUT PWORD Attributes);
CSR_API(SrvGetConsoleScreenBufferInfo)
{
NTSTATUS Status;
@@ -701,7 +706,12 @@
Status = ConDrvGetConsoleScreenBufferInfo(Buffer->Header.Console,
Buffer,
- &ScreenBufferInfoRequest->Info);
+
&ScreenBufferInfoRequest->ScreenBufferSize,
+
&ScreenBufferInfoRequest->CursorPosition,
+
&ScreenBufferInfoRequest->ViewOrigin,
+ &ScreenBufferInfoRequest->ViewSize,
+
&ScreenBufferInfoRequest->MaximumViewSize,
+
&ScreenBufferInfoRequest->Attributes);
ConSrvReleaseScreenBuffer(Buffer, TRUE);
return Status;
Modified: trunk/reactos/win32ss/user/winsrv/consrv/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/console.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/console.c [iso-8859-1] Sat Mar 8 15:31:05
2014
@@ -543,22 +543,22 @@
NTSTATUS NTAPI
ConDrvGetConsoleCP(IN PCONSOLE Console,
OUT PUINT CodePage,
- IN BOOLEAN InputCP);
+ IN BOOLEAN OutputCP);
CSR_API(SrvGetConsoleCP)
{
NTSTATUS Status;
- PCONSOLE_GETSETINPUTOUTPUTCP ConsoleCPRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.ConsoleCPRequest;
+ PCONSOLE_GETINPUTOUTPUTCP GetConsoleCPRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetConsoleCPRequest;
PCONSOLE Console;
DPRINT("SrvGetConsoleCP, getting %s Code Page\n",
- ConsoleCPRequest->InputCP ? "Input" : "Output");
+ GetConsoleCPRequest->OutputCP ? "Output" : "Input");
Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Status = ConDrvGetConsoleCP(Console,
- &ConsoleCPRequest->CodePage,
- ConsoleCPRequest->InputCP);
+ &GetConsoleCPRequest->CodePage,
+ GetConsoleCPRequest->OutputCP);
ConSrvReleaseConsole(Console, TRUE);
return Status;
@@ -567,22 +567,22 @@
NTSTATUS NTAPI
ConDrvSetConsoleCP(IN PCONSOLE Console,
IN UINT CodePage,
- IN BOOLEAN InputCP);
+ IN BOOLEAN OutputCP);
CSR_API(SrvSetConsoleCP)
{
NTSTATUS Status = STATUS_INVALID_PARAMETER;
- PCONSOLE_GETSETINPUTOUTPUTCP ConsoleCPRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.ConsoleCPRequest;
+ PCONSOLE_SETINPUTOUTPUTCP SetConsoleCPRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetConsoleCPRequest;
PCONSOLE Console;
DPRINT("SrvSetConsoleCP, setting %s Code Page\n",
- ConsoleCPRequest->InputCP ? "Input" : "Output");
+ SetConsoleCPRequest->OutputCP ? "Output" : "Input");
Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
Status = ConDrvSetConsoleCP(Console,
- ConsoleCPRequest->CodePage,
- ConsoleCPRequest->InputCP);
+ SetConsoleCPRequest->CodePage,
+ SetConsoleCPRequest->OutputCP);
ConSrvReleaseConsole(Console, TRUE);
return Status;
@@ -600,8 +600,8 @@
PCONSOLE Console;
if (!CsrValidateMessageBuffer(ApiMessage,
- (PVOID)&GetProcessListRequest->pProcessIds,
- GetProcessListRequest->nMaxIds,
+ (PVOID)&GetProcessListRequest->ProcessIdsList,
+ GetProcessListRequest->ProcessCount,
sizeof(DWORD)))
{
return STATUS_INVALID_PARAMETER;
@@ -611,9 +611,9 @@
if (!NT_SUCCESS(Status)) return Status;
Status = ConDrvGetConsoleProcessList(Console,
- GetProcessListRequest->pProcessIds,
- GetProcessListRequest->nMaxIds,
-
&GetProcessListRequest->nProcessIdsTotal);
+ GetProcessListRequest->ProcessIdsList,
+ GetProcessListRequest->ProcessCount,
+ &GetProcessListRequest->ProcessCount);
ConSrvReleaseConsole(Console, TRUE);
return Status;
Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontendctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/frontendctl.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/frontendctl.c [iso-8859-1] Sat Mar 8
15:31:05 2014
@@ -222,7 +222,7 @@
Console = Buff->Header.Console;
- Success = TermSetMouseCursor(Console, SetCursorRequest->hCursor);
+ Success = TermSetMouseCursor(Console, SetCursorRequest->CursorHandle);
ConSrvReleaseScreenBuffer(Buff, TRUE);
return (Success ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL);
@@ -244,9 +244,9 @@
Console = Buff->Header.Console;
- MenuControlRequest->hMenu = TermMenuControl(Console,
- MenuControlRequest->dwCmdIdLow,
- MenuControlRequest->dwCmdIdHigh);
+ MenuControlRequest->MenuHandle = TermMenuControl(Console,
+ MenuControlRequest->CmdIdLow,
+ MenuControlRequest->CmdIdHigh);
ConSrvReleaseScreenBuffer(Buff, TRUE);
return STATUS_SUCCESS;
@@ -293,7 +293,7 @@
Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
- Status = (TermChangeIcon(Console, SetIconRequest->WindowIcon)
+ Status = (TermChangeIcon(Console, SetIconRequest->IconHandle)
? STATUS_SUCCESS
: STATUS_UNSUCCESSFUL);
Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guisettings.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guisettings.h [iso-8859-1]
(original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guisettings.h [iso-8859-1] Sat
Mar 8 15:31:05 2014
@@ -64,8 +64,8 @@
BOOL IgnoreNextMouseSignal; /* Used in cases where we don't want to treat a mouse
signal */
BOOL IsCloseButtonEnabled; /* TRUE if the Close button and the corresponding system
menu item are enabled (default), FALSE otherwise */
- UINT cmdIdLow ; /* Lowest menu id of the user-reserved menu id range */
- UINT cmdIdHigh; /* Highest menu id of the user-reserved menu id range */
+ UINT CmdIdLow ; /* Lowest menu id of the user-reserved menu id range */
+ UINT CmdIdHigh; /* Highest menu id of the user-reserved menu id range */
// COLORREF Colors[16];
Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1]
(original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] Sat Mar
8 15:31:05 2014
@@ -231,6 +231,7 @@
er.EventType = MENU_EVENT;
er.Event.MenuEvent.dwCommandId = CmdId;
+ DPRINT1("Menu item ID: %d\n", CmdId);
ConioProcessInputEvent(Console, &er);
}
@@ -265,7 +266,7 @@
* send to him a menu event and return directly. The user must handle those
* reserved menu commands...
*/
- if (GuiData->cmdIdLow <= (UINT)wParam && (UINT)wParam <=
GuiData->cmdIdHigh)
+ if (GuiData->CmdIdLow <= (UINT)wParam && (UINT)wParam <=
GuiData->CmdIdHigh)
{
GuiSendMenuEvent(Console, (UINT)wParam);
goto Unlock_Quit;
@@ -2462,7 +2463,7 @@
GuiData->IsCloseButtonEnabled = TRUE;
/* There is no user-reserved menu id range by default */
- GuiData->cmdIdLow = GuiData->cmdIdHigh = 0;
+ GuiData->CmdIdLow = GuiData->CmdIdHigh = 0;
/*
* We need to wait until the GUI has been fully initialized
@@ -2747,7 +2748,7 @@
static BOOL NTAPI
GuiSetMouseCursor(IN OUT PFRONTEND This,
- HCURSOR hCursor);
+ HCURSOR CursorHandle);
static VOID NTAPI
GuiRefreshInternalInfo(IN OUT PFRONTEND This)
@@ -2781,20 +2782,20 @@
static BOOL NTAPI
GuiChangeIcon(IN OUT PFRONTEND This,
- HICON hWindowIcon)
+ HICON IconHandle)
{
PGUI_CONSOLE_DATA GuiData = This->Data;
HICON hIcon, hIconSm;
- if (hWindowIcon == NULL)
+ if (IconHandle == NULL)
{
hIcon = ghDefaultIcon;
hIconSm = ghDefaultIconSm;
}
else
{
- hIcon = CopyIcon(hWindowIcon);
- hIconSm = CopyIcon(hWindowIcon);
+ hIcon = CopyIcon(IconHandle);
+ hIconSm = CopyIcon(IconHandle);
}
if (hIcon == NULL)
@@ -2953,7 +2954,7 @@
static BOOL NTAPI
GuiSetMouseCursor(IN OUT PFRONTEND This,
- HCURSOR hCursor)
+ HCURSOR CursorHandle)
{
PGUI_CONSOLE_DATA GuiData = This->Data;
@@ -2961,7 +2962,7 @@
* Set the cursor's handle. If the given handle is NULL,
* then restore the default cursor.
*/
- GuiData->hCursor = (hCursor ? hCursor : ghDefaultCursor);
+ GuiData->hCursor = (CursorHandle ? CursorHandle : ghDefaultCursor);
/* Effectively modify the shape of the cursor (use special values for (w|l)Param) */
PostMessageW(GuiData->hWindow, WM_SETCURSOR, -1, -1);
@@ -2971,13 +2972,13 @@
static HMENU NTAPI
GuiMenuControl(IN OUT PFRONTEND This,
- UINT cmdIdLow,
- UINT cmdIdHigh)
+ UINT CmdIdLow,
+ UINT CmdIdHigh)
{
PGUI_CONSOLE_DATA GuiData = This->Data;
- GuiData->cmdIdLow = cmdIdLow ;
- GuiData->cmdIdHigh = cmdIdHigh;
+ GuiData->CmdIdLow = CmdIdLow ;
+ GuiData->CmdIdHigh = CmdIdHigh;
return GetSystemMenu(GuiData->hWindow, FALSE);
}
Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c [iso-8859-1]
(original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c [iso-8859-1] Sat Mar
8 15:31:05 2014
@@ -726,7 +726,7 @@
static BOOL NTAPI
TuiChangeIcon(IN OUT PFRONTEND This,
- HICON hWindowIcon)
+ HICON IconHandle)
{
return TRUE;
}
@@ -778,15 +778,15 @@
static BOOL NTAPI
TuiSetMouseCursor(IN OUT PFRONTEND This,
- HCURSOR hCursor)
+ HCURSOR CursorHandle)
{
return TRUE;
}
static HMENU NTAPI
TuiMenuControl(IN OUT PFRONTEND This,
- UINT cmdIdLow,
- UINT cmdIdHigh)
+ UINT CmdIdLow,
+ UINT CmdIdHigh)
{
return NULL;
}
Modified: trunk/reactos/win32ss/user/winsrv/consrv/handle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/handle.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/handle.c [iso-8859-1] Sat Mar 8 15:31:05
2014
@@ -836,7 +836,7 @@
return Status;
}
- Status = ConSrvRemoveObject(ProcessData, CloseHandleRequest->ConsoleHandle);
+ Status = ConSrvRemoveObject(ProcessData, CloseHandleRequest->Handle);
ConSrvReleaseConsole(Console, TRUE);
return Status;
@@ -849,8 +849,10 @@
PCONSOLE_PROCESS_DATA ProcessData =
ConsoleGetPerProcessData(CsrGetClientThread()->Process);
PCONSOLE Console;
- HANDLE ConsoleHandle = VerifyHandleRequest->ConsoleHandle;
- ULONG Index = HandleToULong(ConsoleHandle) >> 2;
+ HANDLE IoHandle = VerifyHandleRequest->Handle;
+ ULONG Index = HandleToULong(IoHandle) >> 2;
+
+ VerifyHandleRequest->IsValid = FALSE;
Status = ConSrvGetConsole(ProcessData, &Console, TRUE);
if (!NT_SUCCESS(Status))
@@ -864,18 +866,21 @@
// ASSERT( (ProcessData->HandleTable == NULL &&
ProcessData->HandleTableSize == 0) ||
// (ProcessData->HandleTable != NULL &&
ProcessData->HandleTableSize != 0) );
- if (!IsConsoleHandle(ConsoleHandle) ||
+ if (!IsConsoleHandle(IoHandle) ||
Index >= ProcessData->HandleTableSize ||
ProcessData->HandleTable[Index].Object == NULL)
{
DPRINT("SrvVerifyConsoleIoHandle failed\n");
- Status = STATUS_INVALID_HANDLE;
+ }
+ else
+ {
+ VerifyHandleRequest->IsValid = TRUE;
}
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
ConSrvReleaseConsole(Console, TRUE);
- return Status;
+ return STATUS_SUCCESS;
}
/* EOF */
Modified: trunk/reactos/win32ss/user/winsrv/consrv/include/conio.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1] Sat Mar 8
15:31:05 2014
@@ -224,7 +224,7 @@
*/
VOID (NTAPI *ChangeTitle)(IN OUT PFRONTEND This);
BOOL (NTAPI *ChangeIcon)(IN OUT PFRONTEND This,
- HICON hWindowIcon);
+ HICON IconHandle);
HWND (NTAPI *GetConsoleWindowHandle)(IN OUT PFRONTEND This);
VOID (NTAPI *GetLargestConsoleWindowSize)(IN OUT PFRONTEND This,
PCOORD pSize);
@@ -237,10 +237,10 @@
INT (NTAPI *ShowMouseCursor)(IN OUT PFRONTEND This,
BOOL Show);
BOOL (NTAPI *SetMouseCursor)(IN OUT PFRONTEND This,
- HCURSOR hCursor);
+ HCURSOR CursorHandle);
HMENU (NTAPI *MenuControl)(IN OUT PFRONTEND This,
- UINT cmdIdLow,
- UINT cmdIdHigh);
+ UINT CmdIdLow,
+ UINT CmdIdHigh);
BOOL (NTAPI *SetMenuClose)(IN OUT PFRONTEND This,
BOOL Enable);
Modified: trunk/reactos/win32ss/user/winsrv/consrv/include/term.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/include/term.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/include/term.h [iso-8859-1] Sat Mar 8
15:31:05 2014
@@ -32,8 +32,8 @@
#define TermChangeTitle(Console) \
(Console)->TermIFace.Vtbl->ChangeTitle(&(Console)->TermIFace)
-#define TermChangeIcon(Console, hWindowIcon) \
- (Console)->TermIFace.Vtbl->ChangeIcon(&(Console)->TermIFace,
(hWindowIcon))
+#define TermChangeIcon(Console, IconHandle) \
+ (Console)->TermIFace.Vtbl->ChangeIcon(&(Console)->TermIFace,
(IconHandle))
#define TermGetConsoleWindowHandle(Console) \
(Console)->TermIFace.Vtbl->GetConsoleWindowHandle(&(Console)->TermIFace)
#define TermGetLargestConsoleWindowSize(Console, pSize) \
@@ -46,8 +46,8 @@
(Console)->TermIFace.Vtbl->SetDisplayMode(&(Console)->TermIFace,
(NewMode))
#define TermShowMouseCursor(Console, Show) \
(Console)->TermIFace.Vtbl->ShowMouseCursor(&(Console)->TermIFace,
(Show))
-#define TermSetMouseCursor(Console, hCursor) \
- (Console)->TermIFace.Vtbl->SetMouseCursor(&(Console)->TermIFace,
(hCursor))
+#define TermSetMouseCursor(Console, CursorHandle) \
+ (Console)->TermIFace.Vtbl->SetMouseCursor(&(Console)->TermIFace,
(CursorHandle))
#define TermMenuControl(Console, CmdIdLow, CmdIdHigh) \
(Console)->TermIFace.Vtbl->MenuControl(&(Console)->TermIFace,
(CmdIdLow), (CmdIdHigh))
#define TermSetMenuClose(Console, Enable) \