Author: hbelusca
Date: Sun Mar 1 00:28:17 2015
New Revision: 66508
URL: http://svn.reactos.org/svn/reactos?rev=66508&view=rev
Log:
[KBSWITCH]
Add keyboard switcher to startup, per-user. Since we currently do not support expandable string values for shell run startup, just use a normal string. Also there's currently a bug in our explorer that makes the icon of kbswitch not appearing when it is launched at startup.
See CORE-6787 for more information.
Modified:
trunk/reactos/boot/bootdata/hivedef.inf
trunk/reactos/boot/bootdata/hivesft.inf
Modified: trunk/reactos/boot/bootdata/hivedef.inf
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivedef.inf?…
==============================================================================
--- trunk/reactos/boot/bootdata/hivedef.inf [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/hivedef.inf [iso-8859-1] Sun Mar 1 00:28:17 2015
@@ -1851,6 +1851,10 @@
HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run",,0x00000012
HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony",,0x00000012
HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",,0x00000012
+
+; Keyboard layout switcher
+;HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","kbswitch.exe",0x00020000,"%SystemRoot%\system32\kbswitch.exe"
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","kbswitch.exe",2,"kbswitch.exe"
HKCU,"SOFTWARE\Microsoft\Windows NT",,0x00000012
HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion",,0x00000012
Modified: trunk/reactos/boot/bootdata/hivesft.inf
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesft.inf?…
==============================================================================
--- trunk/reactos/boot/bootdata/hivesft.inf [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/hivesft.inf [iso-8859-1] Sun Mar 1 00:28:17 2015
@@ -1608,9 +1608,6 @@
HKLM,"SOFTWARE\Microsoft\Ole","EnableDCOM",0x00000000,"Y"
HKLM,"SOFTWARE\Microsoft\Ole","EnableRemoteConnect",0x00000000,"N"
-
-; Keyboard layout switcher
-;HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","kbswitch",0x00000000,"kbswitch.exe"
; SvcHost services
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost",,0x00000012
Author: hbelusca
Date: Sat Feb 28 23:50:01 2015
New Revision: 66507
URL: http://svn.reactos.org/svn/reactos?rev=66507&view=rev
Log:
[HELP]: Fix console output for languages using non-latin characters. Patch by Vort.
CORE-7409 #resolve #comment Fixed, thanks!
Modified:
trunk/reactos/base/applications/cmdutils/help/help.c
Modified: trunk/reactos/base/applications/cmdutils/help/help.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/help/help.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/help/help.c [iso-8859-1] Sat Feb 28 23:50:01 2015
@@ -21,50 +21,21 @@
#include "help.h"
#include "resource.h"
-BOOL IsConsoleHandle(HANDLE hHandle)
-{
- DWORD dwMode;
-
- /* Check whether the handle may be that of a console... */
- if ((GetFileType(hHandle) & ~FILE_TYPE_REMOTE) != FILE_TYPE_CHAR)
- return FALSE;
-
- /*
- * It may be. Perform another test... The idea comes from the
- * MSDN description of the WriteConsole API:
- *
- * "WriteConsole fails if it is used with a standard handle
- * that is redirected to a file. If an application processes
- * multilingual output that can be redirected, determine whether
- * the output handle is a console handle (one method is to call
- * the GetConsoleMode function and check whether it succeeds).
- * If the handle is a console handle, call WriteConsole. If the
- * handle is not a console handle, the output is redirected and
- * you should call WriteFile to perform the I/O."
- */
- return GetConsoleMode(hHandle, &dwMode);
-}
-
VOID PrintResourceString(INT resID, ...)
{
- HANDLE OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE);
- WCHAR tmpBuffer[RC_STRING_MAX_SIZE];
- va_list arg_ptr;
+ WCHAR bufSrc[RC_STRING_MAX_SIZE];
+ WCHAR bufFormatted[RC_STRING_MAX_SIZE];
+ CHAR bufFormattedOem[RC_STRING_MAX_SIZE];
- va_start(arg_ptr, resID);
- LoadStringW(GetModuleHandleW(NULL), resID, tmpBuffer, RC_STRING_MAX_SIZE);
+ va_list args;
+ va_start(args, resID);
- // FIXME: Optimize by using Win32 console functions.
- if (IsConsoleHandle(OutputHandle))
- {
- vfwprintf(stdout, tmpBuffer, arg_ptr);
- }
- else
- {
- vwprintf(tmpBuffer, arg_ptr);
- }
+ LoadStringW(GetModuleHandleW(NULL), resID, bufSrc, RC_STRING_MAX_SIZE);
+ vswprintf(bufFormatted, bufSrc, args);
+ CharToOemW(bufFormatted, bufFormattedOem);
+ fputs(bufFormattedOem, stdout);
- va_end(arg_ptr);
+ va_end(args);
}
BOOL IsInternalCommand(LPCWSTR Cmd)
@@ -75,7 +46,7 @@
/* Invalid command */
if (!Cmd) return FALSE;
- for (i = 0; i < sizeof(InternalCommands)/sizeof(InternalCommands[0]); ++i)
+ for (i = 0; i < ARRAYSIZE(InternalCommands); ++i)
{
res = _wcsicmp(InternalCommands[i], Cmd);
if (res == 0)