Author: gadamopoulos
Date: Fri Dec 9 18:30:50 2016
New Revision: 73441
URL: http://svn.reactos.org/svn/reactos?rev=73441&view=rev
Log:
[USETUP] -Fix setting the language id when compiling for a single language. CORE-10958
Modified:
trunk/reactos/base/setup/usetup/interface/usetup.c
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Fri Dec 9 18:30:50 2016
@@ -662,7 +662,10 @@
/* If there's just a single language in the list skip
* the language selection process altogether! */
if (GenericListHasSingleEntry(LanguageList))
+ {
+ LanguageId = (LANGID)(wcstol(SelectedLanguageId, NULL, 16) & 0xFFFF);
return INTRO_PAGE;
+ }
DrawGenericList(LanguageList,
2,
Author: gadamopoulos
Date: Wed Dec 7 15:43:17 2016
New Revision: 73438
URL: http://svn.reactos.org/svn/reactos?rev=73438&view=rev
Log:
[SHELL32] - CDefView: Remove some todo comments that are done.
Modified:
trunk/reactos/dll/win32/shell32/CDefView.cpp
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Wed Dec 7 15:43:17 2016
@@ -20,26 +20,16 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
- * FIXME: The order by part of the background context menu should be
- * built according to the columns shown.
- *
* FIXME: CheckToolbar: handle the "new folder" and "folder up" button
*/
/*
TODO:
- Load/Save the view state from/into the stream provided by the ShellBrowser.
-- Code to merge menus in the shellbrowser is incorrect.
-- Move the background context menu creation into shell view. It should store the
- shell view HWND to send commands.
-- Shell view should do SetCommandTarget on internet toolbar.
- When editing starts on item, set edit text to for editing value.
-- When shell view is called back for item info, let listview save the value.
- Fix shell view to handle view mode popup exec.
- The background context menu should have a pidl just like foreground menus. This
causes crashes when dynamic handlers try to use the NULL pidl.
-- The SHELLDLL_DefView should not be filled with blue unconditionally. This causes
- annoying flashing of blue even on XP, and is not correct.
- Reorder of columns doesn't work - might be bug in comctl32
*/
Author: hbelusca
Date: Tue Dec 6 23:01:27 2016
New Revision: 73435
URL: http://svn.reactos.org/svn/reactos?rev=73435&view=rev
Log:
[SERVICES]: Addendum to r73433 for ScmStartUserModeService:
- Use the correct capitalization for the desktop name (to be consistent with all the rest of our code);
- Fix DPRINT1 order of arguments;
- Reorganize a bit the code to avoid the memory leak if ImpersonateLoggedOnUser fails and the environment block was already allocated (caught by Ged Murphy).
CORE-12414
Modified:
trunk/reactos/base/system/services/database.c
Modified: trunk/reactos/base/system/services/database.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/datab…
==============================================================================
--- trunk/reactos/base/system/services/database.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/services/database.c [iso-8859-1] Tue Dec 6 23:01:27 2016
@@ -1700,8 +1700,11 @@
ZeroMemory(&ProcessInformation, sizeof(ProcessInformation));
/* Use the interactive desktop if the service is interactive */
+ // TODO: We should also check the value "NoInteractiveServices ":
+ // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683502(v=vs.85).…
+ // for more details.
if (Service->Status.dwServiceType & SERVICE_INTERACTIVE_PROCESS)
- StartupInfo.lpDesktop = L"winsta0\\default";
+ StartupInfo.lpDesktop = L"WinSta0\\Default";
if (Service->lpImage->hToken)
{
@@ -1710,34 +1713,38 @@
if (!CreateEnvironmentBlock(&lpEnvironment, Service->lpImage->hToken, FALSE))
{
/* We failed, run the service with the current environment */
- DPRINT1("CreateEnvironmentBlock() failed with error %d, service '%S' will run with the current environment.\n",
- Service->lpServiceName, GetLastError());
+ DPRINT1("CreateEnvironmentBlock() failed with error %d; service '%S' will run with the current environment.\n",
+ GetLastError(), Service->lpServiceName);
lpEnvironment = NULL;
}
/* Impersonate the new user */
- if (!ImpersonateLoggedOnUser(Service->lpImage->hToken))
+ Result = ImpersonateLoggedOnUser(Service->lpImage->hToken);
+ if (Result)
+ {
+ /* Launch the process in the user's logon session */
+ Result = CreateProcessAsUserW(Service->lpImage->hToken,
+ NULL,
+ Service->lpImage->pszImagePath,
+ NULL,
+ NULL,
+ FALSE,
+ CREATE_UNICODE_ENVIRONMENT | DETACHED_PROCESS | CREATE_SUSPENDED,
+ lpEnvironment,
+ NULL,
+ &StartupInfo,
+ &ProcessInformation);
+ if (!Result)
+ dwError = GetLastError();
+
+ /* Revert the impersonation */
+ RevertToSelf();
+ }
+ else
{
dwError = GetLastError();
- DPRINT1("ImpersonateLoggedOnUser() failed with error %d\n", GetLastError());
- return dwError;
- }
-
- /* Launch the process in the user's logon session */
- Result = CreateProcessAsUserW(Service->lpImage->hToken,
- NULL,
- Service->lpImage->pszImagePath,
- NULL,
- NULL,
- FALSE,
- CREATE_UNICODE_ENVIRONMENT | DETACHED_PROCESS | CREATE_SUSPENDED,
- lpEnvironment,
- NULL,
- &StartupInfo,
- &ProcessInformation);
-
- /* Revert the impersonation */
- RevertToSelf();
+ DPRINT1("ImpersonateLoggedOnUser() failed with error %d\n", dwError);
+ }
}
else
{
@@ -1746,8 +1753,8 @@
if (!CreateEnvironmentBlock(&lpEnvironment, NULL, TRUE))
{
/* We failed, run the service with the current environment */
- DPRINT1("CreateEnvironmentBlock() failed with error %d, service '%S' will run with the current environment.\n",
- Service->lpServiceName, GetLastError());
+ DPRINT1("CreateEnvironmentBlock() failed with error %d; service '%S' will run with the current environment.\n",
+ GetLastError(), Service->lpServiceName);
lpEnvironment = NULL;
}
@@ -1761,6 +1768,8 @@
NULL,
&StartupInfo,
&ProcessInformation);
+ if (!Result)
+ dwError = GetLastError();
}
if (lpEnvironment)
@@ -1768,8 +1777,8 @@
if (!Result)
{
- dwError = GetLastError();
- DPRINT1("Starting '%S' failed!\n", Service->lpServiceName);
+ DPRINT1("Starting '%S' failed with error %d\n",
+ Service->lpServiceName, dwError);
return dwError;
}