/* INCLUDES *****************************************************************/
#include "winlogon.h"
-#include <shlobj.h>
-
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(winlogon);
-
-/* GLOBALS ******************************************************************/
-
/* FUNCTIONS ****************************************************************/
-static VOID
-BuildVolatileEnvironment(IN PWLSESSION Session,
- IN HKEY hKeyCurrentUser)
+static
+VOID
+BuildVolatileEnvironment(
+ IN PWLSESSION Session,
+ IN HKEY hKeyCurrentUser)
{
WCHAR szPath[MAX_PATH + 1];
LPCWSTR wstr;
BOOL
-CreateUserEnvironment(IN PWLSESSION Session)
+CreateUserEnvironment(
+ IN PWLSESSION Session)
{
HKEY hKeyCurrentUser;
LONG lError;
TRACE("WL: CreateUserEnvironment called\n");
/* Impersonate the new user */
- ImpersonateLoggedOnUser(Session->UserToken);
+ if (!ImpersonateLoggedOnUser(Session->UserToken))
+ {
+ ERR("ImpersonateLoggedOnUser() failed with error %lu\n", GetLastError());
+ return FALSE;
+ }
- /* Open the new users HKCU key */
+ /* Open the new user HKCU key */
lError = RegOpenCurrentUser(KEY_CREATE_SUB_KEY,
&hKeyCurrentUser);
if (lError == ERROR_SUCCESS)