Author: hbelusca Date: Thu Nov 15 22:34:44 2012 New Revision: 57713
URL: http://svn.reactos.org/svn/reactos?rev=57713&view=rev Log: [KERNEL32] - Move console-related Vista+ functions from client/vista.c to a dedicated client/console/vista.c file, and add it to compilation. - Move some helper functions from console.c to history.c. - Use the new api index names in history.c.
[CONSRV] - Merge CSRSS_GET_HISTORY_INFO and PCSRSS_SET_HISTORY_INFO structures declarations into CSRSS_HISTORY_INFO, and therefore use only one member of it inside CONSOLE_API_MESSAGE structure. - WORD --> UINT for few structure members related to history information.
Added: branches/ros-csrss/dll/win32/kernel32/client/console/vista.c (with props) Modified: branches/ros-csrss/dll/win32/kernel32/CMakeLists.txt branches/ros-csrss/dll/win32/kernel32/client/console/console.c branches/ros-csrss/dll/win32/kernel32/client/console/history.c branches/ros-csrss/dll/win32/kernel32/client/vista.c branches/ros-csrss/include/reactos/subsys/win/conmsg.h branches/ros-csrss/win32ss/user/consrv/conio.h branches/ros-csrss/win32ss/user/consrv/guiconsole.c branches/ros-csrss/win32ss/user/consrv/lineinput.c
Modified: branches/ros-csrss/dll/win32/kernel32/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/CMa... ============================================================================== --- branches/ros-csrss/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] (original) +++ branches/ros-csrss/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] Thu Nov 15 22:34:44 2012 @@ -42,6 +42,7 @@ client/console/console.c client/console/history.c client/console/readwrite.c + client/console/vista.c client/file/backup.c client/file/cnotify.c client/file/copy.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/cli... ============================================================================== --- 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] Thu Nov 15 22:34:44 2012 @@ -177,37 +177,6 @@ ExitThread(nExitCode); }
-/* Get the size needed to copy a string to a capture buffer, including alignment */ -static ULONG -IntStringSize(LPCVOID String, - BOOL Unicode) -{ - ULONG Size = (Unicode ? wcslen(String) : strlen(String)) * sizeof(WCHAR); - return (Size + 3) & -4; -} - -/* Copy a string to a capture buffer */ -static VOID -IntCaptureMessageString(PCSR_CAPTURE_BUFFER CaptureBuffer, - LPCVOID String, - BOOL Unicode, - PUNICODE_STRING RequestString) -{ - ULONG Size; - if (Unicode) - { - Size = wcslen(String) * sizeof(WCHAR); - CsrCaptureMessageBuffer(CaptureBuffer, (PVOID)String, Size, (PVOID *)&RequestString->Buffer); - } - else - { - Size = strlen(String); - CsrAllocateMessagePointer(CaptureBuffer, Size * sizeof(WCHAR), (PVOID *)&RequestString->Buffer); - Size = MultiByteToWideChar(CP_ACP, 0, String, Size, RequestString->Buffer, Size * sizeof(WCHAR)) - * sizeof(WCHAR); - } - RequestString->Length = RequestString->MaximumLength = Size; -}
/* FUNCTIONS ******************************************************************/
Modified: branches/ros-csrss/dll/win32/kernel32/client/console/history.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cli... ============================================================================== --- branches/ros-csrss/dll/win32/kernel32/client/console/history.c [iso-8859-1] (original) +++ branches/ros-csrss/dll/win32/kernel32/client/console/history.c [iso-8859-1] Thu Nov 15 22:34:44 2012 @@ -16,12 +16,47 @@
/* PRIVATE FUNCTIONS **********************************************************/
+/* Get the size needed to copy a string to a capture buffer, including alignment */ +static ULONG +IntStringSize(LPCVOID String, + BOOL Unicode) +{ + ULONG Size = (Unicode ? wcslen(String) : strlen(String)) * sizeof(WCHAR); + return (Size + 3) & -4; +} + + +/* Copy a string to a capture buffer */ +static VOID +IntCaptureMessageString(PCSR_CAPTURE_BUFFER CaptureBuffer, + LPCVOID String, + BOOL Unicode, + PUNICODE_STRING RequestString) +{ + ULONG Size; + if (Unicode) + { + Size = wcslen(String) * sizeof(WCHAR); + CsrCaptureMessageBuffer(CaptureBuffer, (PVOID)String, Size, (PVOID *)&RequestString->Buffer); + } + else + { + Size = strlen(String); + CsrAllocateMessagePointer(CaptureBuffer, Size * sizeof(WCHAR), (PVOID *)&RequestString->Buffer); + Size = MultiByteToWideChar(CP_ACP, 0, String, Size, RequestString->Buffer, Size * sizeof(WCHAR)) + * sizeof(WCHAR); + } + RequestString->Length = RequestString->MaximumLength = Size; +} + + static BOOL IntExpungeConsoleCommandHistory(LPCVOID lpExeName, BOOL bUnicode) { - CSR_API_MESSAGE Request; + NTSTATUS Status; + CONSOLE_API_MESSAGE ApiMessage; + PCSRSS_EXPUNGE_COMMAND_HISTORY ExpungeCommandHistory = &ApiMessage.Data.ExpungeCommandHistory; PCSR_CAPTURE_BUFFER CaptureBuffer; - NTSTATUS Status;
if (lpExeName == NULL || !(bUnicode ? *(PWCHAR)lpExeName : *(PCHAR)lpExeName)) { @@ -38,16 +73,16 @@ }
IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode, - &Request.Data.ExpungeCommandHistory.ExeName); - - Status = CsrClientCallServer(&Request, + &ExpungeCommandHistory->ExeName); + + Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, CaptureBuffer, - CSR_CREATE_API_NUMBER(CSR_CONSOLE, EXPUNGE_COMMAND_HISTORY), - sizeof(CSR_API_MESSAGE)); + CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepExpungeCommandHistory), + sizeof(CSRSS_EXPUNGE_COMMAND_HISTORY));
CsrFreeCaptureBuffer(CaptureBuffer);
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status)) + if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status)) { BaseSetLastNTError(Status); return FALSE; @@ -60,9 +95,10 @@ static DWORD IntGetConsoleCommandHistory(LPVOID lpHistory, DWORD cbHistory, LPCVOID lpExeName, BOOL bUnicode) { - CSR_API_MESSAGE Request; + NTSTATUS Status; + CONSOLE_API_MESSAGE ApiMessage; + PCSRSS_GET_COMMAND_HISTORY GetCommandHistory = &ApiMessage.Data.GetCommandHistory; PCSR_CAPTURE_BUFFER CaptureBuffer; - NTSTATUS Status; DWORD HistoryLength = cbHistory * (bUnicode ? 1 : sizeof(WCHAR));
if (lpExeName == NULL || !(bUnicode ? *(PWCHAR)lpExeName : *(PCHAR)lpExeName)) @@ -81,16 +117,16 @@ }
IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode, - &Request.Data.GetCommandHistory.ExeName); - Request.Data.GetCommandHistory.Length = HistoryLength; + &GetCommandHistory->ExeName); + GetCommandHistory->Length = HistoryLength; CsrAllocateMessagePointer(CaptureBuffer, HistoryLength, - (PVOID*)&Request.Data.GetCommandHistory.History); - - Status = CsrClientCallServer(&Request, + (PVOID*)&GetCommandHistory->History); + + Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, CaptureBuffer, - CSR_CREATE_API_NUMBER(CSR_CONSOLE, GET_COMMAND_HISTORY), - sizeof(CSR_API_MESSAGE)); - if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status)) + CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepGetCommandHistory), + sizeof(CSRSS_GET_COMMAND_HISTORY)); + if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status)) { CsrFreeCaptureBuffer(CaptureBuffer); BaseSetLastNTError(Status); @@ -100,30 +136,32 @@ if (bUnicode) { memcpy(lpHistory, - Request.Data.GetCommandHistory.History, - Request.Data.GetCommandHistory.Length); + GetCommandHistory->History, + GetCommandHistory->Length); } else { WideCharToMultiByte(CP_ACP, 0, - Request.Data.GetCommandHistory.History, - Request.Data.GetCommandHistory.Length / sizeof(WCHAR), + GetCommandHistory->History, + GetCommandHistory->Length / sizeof(WCHAR), lpHistory, cbHistory, NULL, NULL); }
CsrFreeCaptureBuffer(CaptureBuffer); - return Request.Data.GetCommandHistory.Length; + + return GetCommandHistory->Length; }
static DWORD IntGetConsoleCommandHistoryLength(LPCVOID lpExeName, BOOL bUnicode) { - CSR_API_MESSAGE Request; + NTSTATUS Status; + CONSOLE_API_MESSAGE ApiMessage; + PCSRSS_GET_COMMAND_HISTORY_LENGTH GetCommandHistoryLength = &ApiMessage.Data.GetCommandHistoryLength; PCSR_CAPTURE_BUFFER CaptureBuffer; - NTSTATUS Status;
if (lpExeName == NULL || !(bUnicode ? *(PWCHAR)lpExeName : *(PCHAR)lpExeName)) { @@ -140,22 +178,22 @@ }
IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode, - &Request.Data.GetCommandHistoryLength.ExeName); - - Status = CsrClientCallServer(&Request, + &GetCommandHistoryLength->ExeName); + + Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, CaptureBuffer, - CSR_CREATE_API_NUMBER(CSR_CONSOLE, GET_COMMAND_HISTORY_LENGTH), - sizeof(CSR_API_MESSAGE)); + CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepGetCommandHistoryLength), + sizeof(CSRSS_GET_COMMAND_HISTORY_LENGTH));
CsrFreeCaptureBuffer(CaptureBuffer);
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status)) + if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status)) { BaseSetLastNTError(Status); return 0; }
- return Request.Data.GetCommandHistoryLength.Length; + return GetCommandHistoryLength->Length; }
@@ -164,9 +202,10 @@ LPCVOID lpExeName, BOOL bUnicode) { - CSR_API_MESSAGE Request; + NTSTATUS Status; + CONSOLE_API_MESSAGE ApiMessage; + PCSRSS_SET_HISTORY_NUMBER_COMMANDS SetHistoryNumberCommands = &ApiMessage.Data.SetHistoryNumberCommands; PCSR_CAPTURE_BUFFER CaptureBuffer; - NTSTATUS Status;
if (lpExeName == NULL || !(bUnicode ? *(PWCHAR)lpExeName : *(PCHAR)lpExeName)) { @@ -183,17 +222,17 @@ }
IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode, - &Request.Data.SetHistoryNumberCommands.ExeName); - Request.Data.SetHistoryNumberCommands.NumCommands = dwNumCommands; - - Status = CsrClientCallServer(&Request, + &SetHistoryNumberCommands->ExeName); + SetHistoryNumberCommands->NumCommands = dwNumCommands; + + Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, CaptureBuffer, - CSR_CREATE_API_NUMBER(CSR_CONSOLE, SET_HISTORY_NUMBER_COMMANDS), - sizeof(CSR_API_MESSAGE)); + CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepSetNumberOfCommands), + sizeof(CSRSS_SET_HISTORY_NUMBER_COMMANDS));
CsrFreeCaptureBuffer(CaptureBuffer);
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status)) + if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status)) { BaseSetLastNTError(Status); return FALSE;
Added: branches/ros-csrss/dll/win32/kernel32/client/console/vista.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cli... ============================================================================== --- branches/ros-csrss/dll/win32/kernel32/client/console/vista.c (added) +++ branches/ros-csrss/dll/win32/kernel32/client/console/vista.c [iso-8859-1] Thu Nov 15 22:34:44 2012 @@ -1,0 +1,177 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Vista functions + * PROGRAMMER: Thomas Weidenmueller (w3seek@reactos.com) + * Hermes Belusca-Maito (hermes.belusca@sfr.fr) + */ + +/* INCLUDES *******************************************************************/ + +#include <k32.h> + +#define NDEBUG +#include <debug.h> + + +/* PUBLIC FUNCTIONS ***********************************************************/ + +#if _WIN32_WINNT >= 0x600 + +/*-------------------------------------------------------------- + * GetConsoleHistoryInfo + * + * @implemented + */ +BOOL +WINAPI +GetConsoleHistoryInfo(PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo) +{ + NTSTATUS Status; + CONSOLE_API_MESSAGE ApiMessage; + PCSRSS_HISTORY_INFO HistoryInfoRequest = &ApiMessage.Data.HistoryInfoRequest; + + if (lpConsoleHistoryInfo->cbSize != sizeof(CONSOLE_HISTORY_INFO)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, + NULL, + CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepGetHistory), + sizeof(CSRSS_HISTORY_INFO)); + if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status)) + { + BaseSetLastNTError(Status); + return FALSE; + } + + lpConsoleHistoryInfo->HistoryBufferSize = HistoryInfoRequest->HistoryBufferSize; + lpConsoleHistoryInfo->NumberOfHistoryBuffers = HistoryInfoRequest->NumberOfHistoryBuffers; + lpConsoleHistoryInfo->dwFlags = HistoryInfoRequest->dwFlags; + + return TRUE; +} + + +/*-------------------------------------------------------------- + * SetConsoleHistoryInfo + * + * @implemented + */ +BOOL +WINAPI +SetConsoleHistoryInfo(IN PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo) +{ + NTSTATUS Status; + CONSOLE_API_MESSAGE ApiMessage; + PCSRSS_HISTORY_INFO HistoryInfoRequest = &ApiMessage.Data.HistoryInfoRequest; + + if (lpConsoleHistoryInfo->cbSize != sizeof(CONSOLE_HISTORY_INFO)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + HistoryInfoRequest->HistoryBufferSize = lpConsoleHistoryInfo->HistoryBufferSize; + HistoryInfoRequest->NumberOfHistoryBuffers = lpConsoleHistoryInfo->NumberOfHistoryBuffers; + HistoryInfoRequest->dwFlags = lpConsoleHistoryInfo->dwFlags; + + Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, + NULL, + CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepSetHistory), + sizeof(CSRSS_HISTORY_INFO)); + if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status)) + { + BaseSetLastNTError(Status); + return FALSE; + } + + return TRUE; +} + + +/*-------------------------------------------------------------- + * GetConsoleOriginalTitleW + * + * @unimplemented + */ +DWORD +WINAPI +GetConsoleOriginalTitleW(OUT LPWSTR lpConsoleTitle, + IN DWORD nSize) +{ + DPRINT1("GetConsoleOriginalTitleW(0x%p, 0x%x) UNIMPLEMENTED!\n", lpConsoleTitle, nSize); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return 0; +} + + +/*-------------------------------------------------------------- + * GetConsoleOriginalTitleA + * + * @unimplemented + */ +DWORD +WINAPI +GetConsoleOriginalTitleA(OUT LPSTR lpConsoleTitle, + IN DWORD nSize) +{ + DPRINT1("GetConsoleOriginalTitleA(0x%p, 0x%x) UNIMPLEMENTED!\n", lpConsoleTitle, nSize); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return 0; +} + + +/*-------------------------------------------------------------- + * GetConsoleScreenBufferInfoEx + * + * @unimplemented + */ +BOOL +WINAPI +GetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput, + OUT PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx) +{ + DPRINT1("GetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, lpConsoleScreenBufferInfoEx); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + + +/*-------------------------------------------------------------- + * SetConsoleScreenBufferInfoEx + * + * @unimplemented + */ +BOOL +WINAPI +SetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput, + IN PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx) +{ + DPRINT1("SetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, lpConsoleScreenBufferInfoEx); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + + +/*-------------------------------------------------------------- + * GetCurrentConsoleFontEx + * + * @unimplemented + */ +BOOL +WINAPI +GetCurrentConsoleFontEx(IN HANDLE hConsoleOutput, + IN BOOL bMaximumWindow, + OUT PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx) +{ + DPRINT1("GetCurrentConsoleFontEx(0x%p, 0x%x, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, bMaximumWindow, lpConsoleCurrentFontEx); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +#endif + +/* EOF */
Propchange: branches/ros-csrss/dll/win32/kernel32/client/console/vista.c ------------------------------------------------------------------------------ svn:eol-style = native
Modified: branches/ros-csrss/dll/win32/kernel32/client/vista.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/cli... ============================================================================== --- branches/ros-csrss/dll/win32/kernel32/client/vista.c [iso-8859-1] (original) +++ branches/ros-csrss/dll/win32/kernel32/client/vista.c [iso-8859-1] Thu Nov 15 22:34:44 2012 @@ -1,8 +1,11 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: Vista functions * PROGRAMMER: Thomas Weidenmueller w3seek@reactos.com */ + +/* INCLUDES *******************************************************************/
#include <k32.h>
@@ -101,8 +104,8 @@ * @implemented */ BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, - IN DWORD dwSpinCount, - IN DWORD flags ) + IN DWORD dwSpinCount, + IN DWORD flags) { NTSTATUS Status;
@@ -122,7 +125,6 @@ /* Success */ return TRUE; } -
/* @@ -228,6 +230,7 @@ return Result; }
+ /* * @unimplemented */ @@ -307,160 +310,6 @@ { UNIMPLEMENTED; return E_FAIL; -} - -/*-------------------------------------------------------------- - * GetConsoleHistoryInfo - * - * @implemented - */ -BOOL -WINAPI -GetConsoleHistoryInfo(PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo) -{ - NTSTATUS Status; - CONSOLE_API_MESSAGE ApiMessage; - PCSRSS_GET_HISTORY_INFO GetHistoryInfo = &ApiMessage.Data.GetHistoryInfo; - - if (lpConsoleHistoryInfo->cbSize != sizeof(CONSOLE_HISTORY_INFO)) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, - NULL, - CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepGetHistory), - sizeof(CSRSS_GET_HISTORY_INFO)); - if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status)) - { - BaseSetLastNTError(Status); - return FALSE; - } - - lpConsoleHistoryInfo->HistoryBufferSize = GetHistoryInfo->HistoryBufferSize; - lpConsoleHistoryInfo->NumberOfHistoryBuffers = GetHistoryInfo->NumberOfHistoryBuffers; - lpConsoleHistoryInfo->dwFlags = GetHistoryInfo->dwFlags; - - return TRUE; -} - - -/*-------------------------------------------------------------- - * SetConsoleHistoryInfo - * - * @implemented - */ -BOOL -WINAPI -SetConsoleHistoryInfo(IN PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo) -{ - NTSTATUS Status; - CONSOLE_API_MESSAGE ApiMessage; - PCSRSS_SET_HISTORY_INFO SetHistoryInfo = &ApiMessage.Data.SetHistoryInfo; - - if (lpConsoleHistoryInfo->cbSize != sizeof(CONSOLE_HISTORY_INFO)) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - SetHistoryInfo->HistoryBufferSize = lpConsoleHistoryInfo->HistoryBufferSize; - SetHistoryInfo->NumberOfHistoryBuffers = lpConsoleHistoryInfo->NumberOfHistoryBuffers; - SetHistoryInfo->dwFlags = lpConsoleHistoryInfo->dwFlags; - - Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, - NULL, - CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepSetHistory), - sizeof(CSRSS_SET_HISTORY_INFO)); - if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status)) - { - BaseSetLastNTError(Status); - return FALSE; - } - - return TRUE; -} - - -/*-------------------------------------------------------------- - * GetConsoleOriginalTitleW - * - * @unimplemented - */ -DWORD -WINAPI -GetConsoleOriginalTitleW(OUT LPWSTR lpConsoleTitle, - IN DWORD nSize) -{ - DPRINT1("GetConsoleOriginalTitleW(0x%p, 0x%x) UNIMPLEMENTED!\n", lpConsoleTitle, nSize); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; -} - - -/*-------------------------------------------------------------- - * GetConsoleOriginalTitleA - * - * @unimplemented - */ -DWORD -WINAPI -GetConsoleOriginalTitleA(OUT LPSTR lpConsoleTitle, - IN DWORD nSize) -{ - DPRINT1("GetConsoleOriginalTitleA(0x%p, 0x%x) UNIMPLEMENTED!\n", lpConsoleTitle, nSize); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; -} - - -/*-------------------------------------------------------------- - * GetConsoleScreenBufferInfoEx - * - * @unimplemented - */ -BOOL -WINAPI -GetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput, - OUT PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx) -{ - DPRINT1("GetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, lpConsoleScreenBufferInfoEx); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - - -/*-------------------------------------------------------------- - * SetConsoleScreenBufferInfoEx - * - * @unimplemented - */ -BOOL -WINAPI -SetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput, - IN PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx) -{ - DPRINT1("SetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, lpConsoleScreenBufferInfoEx); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - - -/*-------------------------------------------------------------- - * GetCurrentConsoleFontEx - * - * @unimplemented - */ -BOOL -WINAPI -GetCurrentConsoleFontEx(IN HANDLE hConsoleOutput, - IN BOOL bMaximumWindow, - OUT PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx) -{ - DPRINT1("GetCurrentConsoleFontEx(0x%p, 0x%x, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, bMaximumWindow, lpConsoleCurrentFontEx); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; }
@@ -701,6 +550,7 @@ return Ret; }
+ /* * @unimplemented */ @@ -721,6 +571,7 @@ UNIMPLEMENTED; return 0; } +
/* * @implemented @@ -789,6 +640,7 @@ return Ret; }
+ /* * @unimplemented */
Modified: branches/ros-csrss/include/reactos/subsys/win/conmsg.h URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsys... ============================================================================== --- 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] Thu Nov 15 22:34:44 2012 @@ -468,19 +468,19 @@ typedef struct { UNICODE_STRING ExeName; + PWCHAR History; + DWORD Length; +} CSRSS_GET_COMMAND_HISTORY, *PCSRSS_GET_COMMAND_HISTORY; + +typedef struct +{ + UNICODE_STRING ExeName; DWORD Length; } CSRSS_GET_COMMAND_HISTORY_LENGTH, *PCSRSS_GET_COMMAND_HISTORY_LENGTH;
typedef struct { UNICODE_STRING ExeName; - PWCHAR History; - DWORD Length; -} CSRSS_GET_COMMAND_HISTORY, *PCSRSS_GET_COMMAND_HISTORY; - -typedef struct -{ - UNICODE_STRING ExeName; } CSRSS_EXPUNGE_COMMAND_HISTORY, *PCSRSS_EXPUNGE_COMMAND_HISTORY;
typedef struct @@ -491,11 +491,10 @@
typedef struct { - DWORD HistoryBufferSize; - DWORD NumberOfHistoryBuffers; + UINT HistoryBufferSize; + UINT NumberOfHistoryBuffers; DWORD dwFlags; -} CSRSS_GET_HISTORY_INFO, *PCSRSS_GET_HISTORY_INFO, - CSRSS_SET_HISTORY_INFO, *PCSRSS_SET_HISTORY_INFO;; +} CSRSS_HISTORY_INFO, *PCSRSS_HISTORY_INFO;
@@ -607,8 +606,7 @@ CSRSS_GET_COMMAND_HISTORY_LENGTH GetCommandHistoryLength; CSRSS_EXPUNGE_COMMAND_HISTORY ExpungeCommandHistory; CSRSS_SET_HISTORY_NUMBER_COMMANDS SetHistoryNumberCommands; - CSRSS_GET_HISTORY_INFO GetHistoryInfo; - CSRSS_SET_HISTORY_INFO SetHistoryInfo; + CSRSS_HISTORY_INFO HistoryInfoRequest;
CSRSS_GENERATE_CTRL_EVENT GenerateCtrlEvent; CSRSS_GET_NUM_INPUT_EVENTS GetNumInputEventsRequest;
Modified: branches/ros-csrss/win32ss/user/consrv/conio.h URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/co... ============================================================================== --- branches/ros-csrss/win32ss/user/consrv/conio.h [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/consrv/conio.h [iso-8859-1] Thu Nov 15 22:34:44 2012 @@ -63,8 +63,8 @@ BOOLEAN LineInsertToggle; /* replace character over cursor instead of inserting */ ULONG LineWakeupMask; /* bitmap of which control characters will end line input */ LIST_ENTRY HistoryBuffers; - WORD HistoryBufferSize; /* size for newly created history buffers */ - WORD NumberOfHistoryBuffers; /* maximum number of history buffers allowed */ + UINT HistoryBufferSize; /* size for newly created history buffers */ + UINT NumberOfHistoryBuffers; /* maximum number of history buffers allowed */ BOOLEAN HistoryNoDup; /* remove old duplicate history entries */ LIST_ENTRY BufferList; /* List of all screen buffers for this console */ PCSRSS_SCREEN_BUFFER ActiveBuffer; /* Pointer to currently active screen buffer */
Modified: branches/ros-csrss/win32ss/user/consrv/guiconsole.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/gu... ============================================================================== --- branches/ros-csrss/win32ss/user/consrv/guiconsole.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/consrv/guiconsole.c [iso-8859-1] Thu Nov 15 22:34:44 2012 @@ -434,8 +434,7 @@ } else { - DWORD Temp = Console->NumberOfHistoryBuffers; - RegSetValueExW(hKey, L"NumberOfHistoryBuffers", 0, REG_DWORD, (const BYTE *)&Temp, sizeof(DWORD)); + RegSetValueExW(hKey, L"NumberOfHistoryBuffers", 0, REG_DWORD, (const BYTE *)&Console->NumberOfHistoryBuffers, sizeof(DWORD)); }
if (Console->HistoryBufferSize == 50) @@ -444,8 +443,7 @@ } else { - DWORD Temp = Console->HistoryBufferSize; - RegSetValueExW(hKey, L"HistoryBufferSize", 0, REG_DWORD, (const BYTE *)&Temp, sizeof(DWORD)); + RegSetValueExW(hKey, L"HistoryBufferSize", 0, REG_DWORD, (const BYTE *)&Console->HistoryBufferSize, sizeof(DWORD)); }
if (GuiData->FullScreen == FALSE) @@ -457,7 +455,7 @@ RegSetValueExW(hKey, L"FullScreen", 0, REG_DWORD, (const BYTE *)&GuiData->FullScreen, sizeof(DWORD)); }
- if ( GuiData->QuickEdit == FALSE) + if (GuiData->QuickEdit == FALSE) { RegDeleteKeyW(hKey, L"QuickEdit"); }
Modified: branches/ros-csrss/win32ss/user/consrv/lineinput.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/li... ============================================================================== --- branches/ros-csrss/win32ss/user/consrv/lineinput.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/consrv/lineinput.c [iso-8859-1] Thu Nov 15 22:34:44 2012 @@ -17,9 +17,9 @@ typedef struct tagHISTORY_BUFFER { LIST_ENTRY ListEntry; - WORD Position; - WORD MaxEntries; - WORD NumEntries; + UINT Position; + UINT MaxEntries; + UINT NumEntries; PUNICODE_STRING Entries; UNICODE_STRING ExeName; } HISTORY_BUFFER, *PHISTORY_BUFFER; @@ -257,7 +257,7 @@ PCSRSS_CONSOLE Console; PHISTORY_BUFFER Hist; NTSTATUS Status; - WORD MaxEntries = SetHistoryNumberCommands->NumCommands; + UINT MaxEntries = SetHistoryNumberCommands->NumCommands; PUNICODE_STRING OldEntryList, NewEntryList;
if (!Win32CsrValidateBuffer(Process, @@ -302,14 +302,14 @@
CSR_API(SrvGetConsoleHistory) { - PCSRSS_GET_HISTORY_INFO GetHistoryInfo = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetHistoryInfo; + PCSRSS_HISTORY_INFO HistoryInfoRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.HistoryInfoRequest; PCSRSS_CONSOLE Console; NTSTATUS Status = ConioConsoleFromProcessData(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console); if (NT_SUCCESS(Status)) { - GetHistoryInfo->HistoryBufferSize = Console->HistoryBufferSize; - GetHistoryInfo->NumberOfHistoryBuffers = Console->NumberOfHistoryBuffers; - GetHistoryInfo->dwFlags = Console->HistoryNoDup; + HistoryInfoRequest->HistoryBufferSize = Console->HistoryBufferSize; + HistoryInfoRequest->NumberOfHistoryBuffers = Console->NumberOfHistoryBuffers; + HistoryInfoRequest->dwFlags = Console->HistoryNoDup; ConioUnlockConsole(Console); } return Status; @@ -317,14 +317,14 @@
CSR_API(SrvSetConsoleHistory) { - PCSRSS_SET_HISTORY_INFO SetHistoryInfo = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetHistoryInfo; + PCSRSS_HISTORY_INFO HistoryInfoRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.HistoryInfoRequest; PCSRSS_CONSOLE Console; NTSTATUS Status = ConioConsoleFromProcessData(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console); if (NT_SUCCESS(Status)) { - Console->HistoryBufferSize = (WORD)SetHistoryInfo->HistoryBufferSize; - Console->NumberOfHistoryBuffers = (WORD)SetHistoryInfo->NumberOfHistoryBuffers; - Console->HistoryNoDup = SetHistoryInfo->dwFlags & HISTORY_NO_DUP_FLAG; + Console->HistoryBufferSize = HistoryInfoRequest->HistoryBufferSize; + Console->NumberOfHistoryBuffers = HistoryInfoRequest->NumberOfHistoryBuffers; + Console->HistoryNoDup = HistoryInfoRequest->dwFlags & HISTORY_NO_DUP_FLAG; ConioUnlockConsole(Console); } return Status;