[USERENV]

Fix coding style and indentation. No code changes!

svn path=/trunk/; revision=60744
This commit is contained in:
Eric Kohl 2013-10-24 20:16:20 +00:00
parent 5bb77216c8
commit 480ce3de05
11 changed files with 1254 additions and 1213 deletions

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,7 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
* FILE: lib/userenv/directory.c * FILE: dll/win32/userenv/directory.c
* PURPOSE: User profile code * PURPOSE: User profile code
* PROGRAMMER: Eric Kohl * PROGRAMMER: Eric Kohl
*/ */
@ -32,7 +32,8 @@
/* FUNCTIONS ***************************************************************/ /* FUNCTIONS ***************************************************************/
BOOL WINAPI BOOL
WINAPI
CopyProfileDirectoryA(LPCSTR lpSourcePath, CopyProfileDirectoryA(LPCSTR lpSourcePath,
LPCSTR lpDestinationPath, LPCSTR lpDestinationPath,
DWORD dwFlags) DWORD dwFlags)
@ -67,7 +68,8 @@ CopyProfileDirectoryA(LPCSTR lpSourcePath,
} }
BOOL WINAPI BOOL
WINAPI
CopyProfileDirectoryW(LPCWSTR lpSourcePath, CopyProfileDirectoryW(LPCWSTR lpSourcePath,
LPCWSTR lpDestinationPath, LPCWSTR lpDestinationPath,
DWORD dwFlags) DWORD dwFlags)
@ -78,8 +80,8 @@ CopyProfileDirectoryW(LPCWSTR lpSourcePath,
BOOL BOOL
CopyDirectory (LPCWSTR lpDestinationPath, CopyDirectory(LPCWSTR lpDestinationPath,
LPCWSTR lpSourcePath) LPCWSTR lpSourcePath)
{ {
WCHAR szFileName[MAX_PATH]; WCHAR szFileName[MAX_PATH];
WCHAR szFullSrcName[MAX_PATH]; WCHAR szFullSrcName[MAX_PATH];
@ -89,110 +91,110 @@ CopyDirectory (LPCWSTR lpDestinationPath,
LPWSTR lpDstPtr; LPWSTR lpDstPtr;
HANDLE hFind; HANDLE hFind;
DPRINT ("CopyDirectory (%S, %S) called\n", DPRINT("CopyDirectory (%S, %S) called\n",
lpDestinationPath, lpSourcePath); lpDestinationPath, lpSourcePath);
wcscpy (szFileName, lpSourcePath); wcscpy(szFileName, lpSourcePath);
wcscat (szFileName, L"\\*.*"); wcscat(szFileName, L"\\*.*");
hFind = FindFirstFileW (szFileName, hFind = FindFirstFileW(szFileName,
&FindFileData); &FindFileData);
if (hFind == INVALID_HANDLE_VALUE) if (hFind == INVALID_HANDLE_VALUE)
{ {
DPRINT1 ("Error: %lu\n", GetLastError()); DPRINT1("Error: %lu\n", GetLastError());
return FALSE; return FALSE;
} }
wcscpy (szFullSrcName, lpSourcePath); wcscpy(szFullSrcName, lpSourcePath);
lpSrcPtr = AppendBackslash (szFullSrcName); lpSrcPtr = AppendBackslash(szFullSrcName);
wcscpy (szFullDstName, lpDestinationPath); wcscpy(szFullDstName, lpDestinationPath);
lpDstPtr = AppendBackslash (szFullDstName); lpDstPtr = AppendBackslash(szFullDstName);
for (;;) for (;;)
{ {
if (wcscmp (FindFileData.cFileName, L".") && if (wcscmp(FindFileData.cFileName, L".") &&
wcscmp (FindFileData.cFileName, L"..")) wcscmp(FindFileData.cFileName, L".."))
{ {
wcscpy (lpSrcPtr, FindFileData.cFileName); wcscpy(lpSrcPtr, FindFileData.cFileName);
wcscpy (lpDstPtr, FindFileData.cFileName); wcscpy(lpDstPtr, FindFileData.cFileName);
if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{ {
DPRINT ("Create directory: %S\n", szFullDstName); DPRINT("Create directory: %S\n", szFullDstName);
if (!CreateDirectoryExW (szFullSrcName, szFullDstName, NULL)) if (!CreateDirectoryExW(szFullSrcName, szFullDstName, NULL))
{ {
if (GetLastError () != ERROR_ALREADY_EXISTS) if (GetLastError() != ERROR_ALREADY_EXISTS)
{ {
DPRINT1 ("Error: %lu\n", GetLastError()); DPRINT1("Error: %lu\n", GetLastError());
FindClose (hFind); FindClose(hFind);
return FALSE; return FALSE;
} }
} }
if (!CopyDirectory (szFullDstName, szFullSrcName)) if (!CopyDirectory(szFullDstName, szFullSrcName))
{ {
DPRINT1 ("Error: %lu\n", GetLastError()); DPRINT1("Error: %lu\n", GetLastError());
FindClose (hFind); FindClose(hFind);
return FALSE; return FALSE;
} }
} }
else else
{ {
DPRINT ("Copy file: %S -> %S\n", szFullSrcName, szFullDstName); DPRINT("Copy file: %S -> %S\n", szFullSrcName, szFullDstName);
if (!CopyFileW (szFullSrcName, szFullDstName, FALSE)) if (!CopyFileW(szFullSrcName, szFullDstName, FALSE))
{ {
DPRINT1 ("Error: %lu\n", GetLastError()); DPRINT1("Error: %lu\n", GetLastError());
FindClose (hFind); FindClose(hFind);
return FALSE; return FALSE;
} }
} }
} }
if (!FindNextFileW (hFind, &FindFileData)) if (!FindNextFileW(hFind, &FindFileData))
{ {
if (GetLastError () != ERROR_NO_MORE_FILES) if (GetLastError() != ERROR_NO_MORE_FILES)
{ {
DPRINT1 ("Error: %lu\n", GetLastError()); DPRINT1("Error: %lu\n", GetLastError());
} }
break; break;
} }
} }
FindClose (hFind); FindClose(hFind);
DPRINT ("CopyDirectory() done\n"); DPRINT("CopyDirectory() done\n");
return TRUE; return TRUE;
} }
BOOL BOOL
CreateDirectoryPath (LPCWSTR lpPathName, CreateDirectoryPath(LPCWSTR lpPathName,
LPSECURITY_ATTRIBUTES lpSecurityAttributes) LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{ {
WCHAR szPath[MAX_PATH]; WCHAR szPath[MAX_PATH];
LPWSTR Ptr; LPWSTR Ptr;
DWORD dwError; DWORD dwError;
DPRINT ("CreateDirectoryPath() called\n"); DPRINT("CreateDirectoryPath() called\n");
if (lpPathName == NULL || *lpPathName == 0) if (lpPathName == NULL || *lpPathName == 0)
return TRUE; return TRUE;
if (CreateDirectoryW (lpPathName, if (CreateDirectoryW(lpPathName,
lpSecurityAttributes)) lpSecurityAttributes))
return TRUE; return TRUE;
dwError = GetLastError (); dwError = GetLastError();
if (dwError == ERROR_ALREADY_EXISTS) if (dwError == ERROR_ALREADY_EXISTS)
return TRUE; return TRUE;
wcscpy (szPath, lpPathName); wcscpy(szPath, lpPathName);
if (wcslen(szPath) > 3 && szPath[1] == ':' && szPath[2] == '\\') if (wcslen(szPath) > 3 && szPath[1] == ':' && szPath[2] == '\\')
{ {
@ -205,15 +207,15 @@ CreateDirectoryPath (LPCWSTR lpPathName,
while (Ptr != NULL) while (Ptr != NULL)
{ {
Ptr = wcschr (Ptr, L'\\'); Ptr = wcschr(Ptr, L'\\');
if (Ptr != NULL) if (Ptr != NULL)
*Ptr = 0; *Ptr = 0;
DPRINT ("CreateDirectory(%S)\n", szPath); DPRINT("CreateDirectory(%S)\n", szPath);
if (!CreateDirectoryW (szPath, if (!CreateDirectoryW(szPath,
lpSecurityAttributes)) lpSecurityAttributes))
{ {
dwError = GetLastError (); dwError = GetLastError();
if (dwError != ERROR_ALREADY_EXISTS) if (dwError != ERROR_ALREADY_EXISTS)
return FALSE; return FALSE;
} }
@ -225,45 +227,46 @@ CreateDirectoryPath (LPCWSTR lpPathName,
} }
} }
DPRINT ("CreateDirectoryPath() done\n"); DPRINT("CreateDirectoryPath() done\n");
return TRUE; return TRUE;
} }
static BOOL static
RecursiveRemoveDir (LPCWSTR lpPath) BOOL
RecursiveRemoveDir(LPCWSTR lpPath)
{ {
WCHAR szPath[MAX_PATH]; WCHAR szPath[MAX_PATH];
WIN32_FIND_DATAW FindData; WIN32_FIND_DATAW FindData;
HANDLE hFind; HANDLE hFind;
BOOL bResult; BOOL bResult;
wcscpy (szPath, lpPath); wcscpy(szPath, lpPath);
wcscat (szPath, L"\\*.*"); wcscat(szPath, L"\\*.*");
DPRINT ("Search path: '%S'\n", szPath); DPRINT("Search path: '%S'\n", szPath);
hFind = FindFirstFileW (szPath, hFind = FindFirstFileW(szPath,
&FindData); &FindData);
if (hFind == INVALID_HANDLE_VALUE) if (hFind == INVALID_HANDLE_VALUE)
return FALSE; return FALSE;
bResult = TRUE; bResult = TRUE;
while (TRUE) while (TRUE)
{ {
if (wcscmp (FindData.cFileName, L".") && if (wcscmp(FindData.cFileName, L".") &&
wcscmp (FindData.cFileName, L"..")) wcscmp(FindData.cFileName, L".."))
{ {
wcscpy (szPath, lpPath); wcscpy(szPath, lpPath);
wcscat (szPath, L"\\"); wcscat(szPath, L"\\");
wcscat (szPath, FindData.cFileName); wcscat(szPath, FindData.cFileName);
DPRINT ("File name: '%S'\n", szPath); DPRINT("File name: '%S'\n", szPath);
if (FindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) if (FindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{ {
DPRINT ("Delete directory: '%S'\n", szPath); DPRINT("Delete directory: '%S'\n", szPath);
if (!RecursiveRemoveDir (szPath)) if (!RecursiveRemoveDir(szPath))
{ {
bResult = FALSE; bResult = FALSE;
break; break;
@ -271,11 +274,11 @@ RecursiveRemoveDir (LPCWSTR lpPath)
if (FindData.dwFileAttributes & FILE_ATTRIBUTE_READONLY) if (FindData.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
{ {
SetFileAttributesW (szPath, SetFileAttributesW(szPath,
FindData.dwFileAttributes & ~FILE_ATTRIBUTE_READONLY); FindData.dwFileAttributes & ~FILE_ATTRIBUTE_READONLY);
} }
if (!RemoveDirectoryW (szPath)) if (!RemoveDirectoryW(szPath))
{ {
bResult = FALSE; bResult = FALSE;
break; break;
@ -283,15 +286,15 @@ RecursiveRemoveDir (LPCWSTR lpPath)
} }
else else
{ {
DPRINT ("Delete file: '%S'\n", szPath); DPRINT("Delete file: '%S'\n", szPath);
if (FindData.dwFileAttributes & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)) if (FindData.dwFileAttributes & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM))
{ {
SetFileAttributesW (szPath, SetFileAttributesW(szPath,
FILE_ATTRIBUTE_NORMAL); FILE_ATTRIBUTE_NORMAL);
} }
if (!DeleteFileW (szPath)) if (!DeleteFileW(szPath))
{ {
bResult = FALSE; bResult = FALSE;
break; break;
@ -299,11 +302,11 @@ RecursiveRemoveDir (LPCWSTR lpPath)
} }
} }
if (!FindNextFileW (hFind, &FindData)) if (!FindNextFileW(hFind, &FindData))
{ {
if (GetLastError () != ERROR_NO_MORE_FILES) if (GetLastError() != ERROR_NO_MORE_FILES)
{ {
DPRINT1 ("Error: %lu\n", GetLastError()); DPRINT1("Error: %lu\n", GetLastError());
bResult = FALSE; bResult = FALSE;
break; break;
} }
@ -312,20 +315,20 @@ RecursiveRemoveDir (LPCWSTR lpPath)
} }
} }
FindClose (hFind); FindClose(hFind);
return bResult; return bResult;
} }
BOOL BOOL
RemoveDirectoryPath (LPCWSTR lpPathName) RemoveDirectoryPath(LPCWSTR lpPathName)
{ {
if (!RecursiveRemoveDir (lpPathName)) if (!RecursiveRemoveDir(lpPathName))
return FALSE; return FALSE;
DPRINT ("Delete directory: '%S'\n", lpPathName); DPRINT("Delete directory: '%S'\n", lpPathName);
return RemoveDirectoryW (lpPathName); return RemoveDirectoryW(lpPathName);
} }
/* EOF */ /* EOF */

View file

@ -19,7 +19,7 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
* FILE: lib/userenv/environment.c * FILE: dll/win32/userenv/environment.c
* PURPOSE: User environment functions * PURPOSE: User environment functions
* PROGRAMMER: Eric Kohl * PROGRAMMER: Eric Kohl
*/ */
@ -30,7 +30,8 @@
#include <debug.h> #include <debug.h>
static BOOL static
BOOL
SetUserEnvironmentVariable(LPVOID *Environment, SetUserEnvironmentVariable(LPVOID *Environment,
LPWSTR lpName, LPWSTR lpName,
LPWSTR lpValue, LPWSTR lpValue,
@ -117,7 +118,8 @@ SetUserEnvironmentVariable(LPVOID *Environment,
} }
static BOOL static
BOOL
AppendUserEnvironmentVariable(LPVOID *Environment, AppendUserEnvironmentVariable(LPVOID *Environment,
LPWSTR lpName, LPWSTR lpName,
LPWSTR lpValue) LPWSTR lpValue)
@ -165,7 +167,8 @@ AppendUserEnvironmentVariable(LPVOID *Environment,
} }
static HKEY static
HKEY
GetCurrentUserKey(HANDLE hToken) GetCurrentUserKey(HANDLE hToken)
{ {
UNICODE_STRING SidString; UNICODE_STRING SidString;
@ -198,7 +201,8 @@ GetCurrentUserKey(HANDLE hToken)
} }
static BOOL static
BOOL
SetUserEnvironment(LPVOID *lpEnvironment, SetUserEnvironment(LPVOID *lpEnvironment,
HKEY hKey, HKEY hKey,
LPWSTR lpSubKeyName) LPWSTR lpSubKeyName)
@ -310,7 +314,8 @@ SetUserEnvironment(LPVOID *lpEnvironment,
} }
BOOL WINAPI BOOL
WINAPI
CreateEnvironmentBlock(LPVOID *lpEnvironment, CreateEnvironmentBlock(LPVOID *lpEnvironment,
HANDLE hToken, HANDLE hToken,
BOOL bInherit) BOOL bInherit)
@ -454,7 +459,8 @@ CreateEnvironmentBlock(LPVOID *lpEnvironment,
} }
BOOL WINAPI BOOL
WINAPI
DestroyEnvironmentBlock(LPVOID lpEnvironment) DestroyEnvironmentBlock(LPVOID lpEnvironment)
{ {
DPRINT("DestroyEnvironmentBlock() called\n"); DPRINT("DestroyEnvironmentBlock() called\n");
@ -471,7 +477,8 @@ DestroyEnvironmentBlock(LPVOID lpEnvironment)
} }
BOOL WINAPI BOOL
WINAPI
ExpandEnvironmentStringsForUserW(IN HANDLE hToken, ExpandEnvironmentStringsForUserW(IN HANDLE hToken,
IN LPCWSTR lpSrc, IN LPCWSTR lpSrc,
OUT LPWSTR lpDest, OUT LPWSTR lpDest,
@ -522,7 +529,8 @@ ExpandEnvironmentStringsForUserW(IN HANDLE hToken,
} }
BOOL WINAPI BOOL
WINAPI
ExpandEnvironmentStringsForUserA(IN HANDLE hToken, ExpandEnvironmentStringsForUserA(IN HANDLE hToken,
IN LPCSTR lpSrc, IN LPCSTR lpSrc,
OUT LPSTR lpDest, OUT LPSTR lpDest,

View file

@ -19,7 +19,7 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
* FILE: lib/userenv/gpolicy.c * FILE: dll/win32/userenv/gpolicy.c
* PURPOSE: Group policy functions * PURPOSE: Group policy functions
* PROGRAMMER: Thomas Weidenmueller <w3seek@reactos.com> * PROGRAMMER: Thomas Weidenmueller <w3seek@reactos.com>
*/ */
@ -110,7 +110,8 @@ UninitializeGPNotifications(VOID)
DeleteCriticalSection(&GPNotifyLock); DeleteCriticalSection(&GPNotifyLock);
} }
static VOID static
VOID
NotifyGPEvents(IN BOOL bMachine) NotifyGPEvents(IN BOOL bMachine)
{ {
PGP_NOTIFY Notify = NotificationList; PGP_NOTIFY Notify = NotificationList;
@ -126,7 +127,9 @@ NotifyGPEvents(IN BOOL bMachine)
} }
} }
static DWORD WINAPI static
DWORD
WINAPI
GPNotificationThreadProc(IN LPVOID lpParameter) GPNotificationThreadProc(IN LPVOID lpParameter)
{ {
HMODULE hModule; HMODULE hModule;
@ -255,7 +258,8 @@ GPNotificationThreadProc(IN LPVOID lpParameter)
return 1; return 1;
} }
static HANDLE static
HANDLE
CreateGPEvent(IN BOOL bMachine, CreateGPEvent(IN BOOL bMachine,
IN PSECURITY_DESCRIPTOR lpSecurityDescriptor) IN PSECURITY_DESCRIPTOR lpSecurityDescriptor)
{ {
@ -274,7 +278,8 @@ CreateGPEvent(IN BOOL bMachine,
return hEvent; return hEvent;
} }
BOOL WINAPI BOOL
WINAPI
RegisterGPNotification(IN HANDLE hEvent, RegisterGPNotification(IN HANDLE hEvent,
IN BOOL bMachine) IN BOOL bMachine)
{ {
@ -378,7 +383,8 @@ Cleanup:
return Ret; return Ret;
} }
BOOL WINAPI BOOL
WINAPI
UnregisterGPNotification(IN HANDLE hEvent) UnregisterGPNotification(IN HANDLE hEvent)
{ {
PGP_NOTIFY Notify = NULL, *NotifyLink; PGP_NOTIFY Notify = NULL, *NotifyLink;
@ -418,7 +424,8 @@ UnregisterGPNotification(IN HANDLE hEvent)
return Ret; return Ret;
} }
BOOL WINAPI BOOL
WINAPI
RefreshPolicy(IN BOOL bMachine) RefreshPolicy(IN BOOL bMachine)
{ {
HANDLE hEvent; HANDLE hEvent;
@ -437,7 +444,8 @@ RefreshPolicy(IN BOOL bMachine)
return Ret; return Ret;
} }
BOOL WINAPI BOOL
WINAPI
RefreshPolicyEx(IN BOOL bMachine, RefreshPolicyEx(IN BOOL bMachine,
IN DWORD dwOptions) IN DWORD dwOptions)
{ {
@ -470,7 +478,8 @@ RefreshPolicyEx(IN BOOL bMachine,
} }
} }
HANDLE WINAPI HANDLE
WINAPI
EnterCriticalPolicySection(IN BOOL bMachine) EnterCriticalPolicySection(IN BOOL bMachine)
{ {
SECURITY_ATTRIBUTES SecurityAttributes; SECURITY_ATTRIBUTES SecurityAttributes;
@ -507,7 +516,8 @@ EnterCriticalPolicySection(IN BOOL bMachine)
return NULL; return NULL;
} }
BOOL WINAPI BOOL
WINAPI
LeaveCriticalPolicySection(IN HANDLE hSection) LeaveCriticalPolicySection(IN HANDLE hSection)
{ {
BOOL Ret; BOOL Ret;
@ -524,7 +534,8 @@ LeaveCriticalPolicySection(IN HANDLE hSection)
return Ret; return Ret;
} }
BOOL WINAPI BOOL
WINAPI
WaitForUserPolicyForegroundProcessing(VOID) WaitForUserPolicyForegroundProcessing(VOID)
{ {
HANDLE hEvent; HANDLE hEvent;
@ -543,7 +554,8 @@ WaitForUserPolicyForegroundProcessing(VOID)
return Ret; return Ret;
} }
BOOL WINAPI BOOL
WINAPI
WaitForMachinePolicyForegroundProcessing(VOID) WaitForMachinePolicyForegroundProcessing(VOID)
{ {
HANDLE hEvent; HANDLE hEvent;

View file

@ -19,7 +19,7 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
* FILE: lib/userenv/internal.h * FILE: dll/win32/userenv/internal.h
* PURPOSE: internal stuff * PURPOSE: internal stuff
* PROGRAMMER: Eric Kohl * PROGRAMMER: Eric Kohl
*/ */
@ -29,15 +29,15 @@
/* directory.c */ /* directory.c */
BOOL BOOL
CopyDirectory (LPCWSTR lpDestinationPath, CopyDirectory(LPCWSTR lpDestinationPath,
LPCWSTR lpSourcePath); LPCWSTR lpSourcePath);
BOOL BOOL
CreateDirectoryPath (LPCWSTR lpPathName, CreateDirectoryPath(LPCWSTR lpPathName,
LPSECURITY_ATTRIBUTES lpSecurityAttributes); LPSECURITY_ATTRIBUTES lpSecurityAttributes);
BOOL BOOL
RemoveDirectoryPath (LPCWSTR lpPathName); RemoveDirectoryPath(LPCWSTR lpPathName);
/* misc.c */ /* misc.c */
typedef struct _DYN_FUNCS typedef struct _DYN_FUNCS
@ -64,35 +64,36 @@ typedef struct _DYN_MODULE
extern DYN_MODULE DynOle32; extern DYN_MODULE DynOle32;
BOOL BOOL
LoadDynamicImports(PDYN_MODULE Module, PDYN_FUNCS DynFuncs); LoadDynamicImports(PDYN_MODULE Module,
PDYN_FUNCS DynFuncs);
VOID VOID
UnloadDynamicImports(PDYN_FUNCS DynFuncs); UnloadDynamicImports(PDYN_FUNCS DynFuncs);
LPWSTR LPWSTR
AppendBackslash (LPWSTR String); AppendBackslash(LPWSTR String);
BOOL BOOL
GetUserSidFromToken (HANDLE hToken, GetUserSidFromToken(HANDLE hToken,
PUNICODE_STRING SidString); PUNICODE_STRING SidString);
PSECURITY_DESCRIPTOR PSECURITY_DESCRIPTOR
CreateDefaultSecurityDescriptor(VOID); CreateDefaultSecurityDescriptor(VOID);
/* profile.c */ /* profile.c */
BOOL BOOL
AppendSystemPostfix (LPWSTR lpName, AppendSystemPostfix(LPWSTR lpName,
DWORD dwMaxLength); DWORD dwMaxLength);
/* registry.c */ /* registry.c */
BOOL BOOL
CreateUserHive (LPCWSTR lpKeyName, CreateUserHive(LPCWSTR lpKeyName,
LPCWSTR lpProfilePath); LPCWSTR lpProfilePath);
/* setup.c */ /* setup.c */
BOOL BOOL
UpdateUsersShellFolderSettings(LPCWSTR lpUserProfilePath, UpdateUsersShellFolderSettings(LPCWSTR lpUserProfilePath,
HKEY hUserKey); HKEY hUserKey);
/* userenv.c */ /* userenv.c */
extern HINSTANCE hInstance; extern HINSTANCE hInstance;

View file

@ -19,7 +19,7 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
* FILE: lib/userenv/misc.c * FILE: dll/win32/userenv/misc.c
* PURPOSE: User profile code * PURPOSE: User profile code
* PROGRAMMER: Eric Kohl * PROGRAMMER: Eric Kohl
*/ */
@ -35,86 +35,86 @@ static SID_IDENTIFIER_AUTHORITY WorldAuthority = {SECURITY_WORLD_SID_AUTHORITY};
/* FUNCTIONS ***************************************************************/ /* FUNCTIONS ***************************************************************/
LPWSTR LPWSTR
AppendBackslash (LPWSTR String) AppendBackslash(LPWSTR String)
{ {
ULONG Length; ULONG Length;
Length = lstrlenW (String); Length = lstrlenW(String);
if (String[Length - 1] != L'\\') if (String[Length - 1] != L'\\')
{ {
String[Length] = L'\\'; String[Length] = L'\\';
Length++; Length++;
String[Length] = (WCHAR)0; String[Length] = (WCHAR)0;
} }
return &String[Length]; return &String[Length];
} }
BOOL BOOL
GetUserSidFromToken (HANDLE hToken, GetUserSidFromToken(HANDLE hToken,
PUNICODE_STRING SidString) PUNICODE_STRING SidString)
{ {
PSID_AND_ATTRIBUTES SidBuffer, nsb; PSID_AND_ATTRIBUTES SidBuffer, nsb;
ULONG Length; ULONG Length;
NTSTATUS Status; NTSTATUS Status;
Length = 256; Length = 256;
SidBuffer = LocalAlloc (LMEM_FIXED, SidBuffer = LocalAlloc(LMEM_FIXED,
Length); Length);
if (SidBuffer == NULL) if (SidBuffer == NULL)
return FALSE; return FALSE;
Status = NtQueryInformationToken (hToken, Status = NtQueryInformationToken(hToken,
TokenUser, TokenUser,
(PVOID)SidBuffer, (PVOID)SidBuffer,
Length, Length,
&Length); &Length);
if (Status == STATUS_BUFFER_TOO_SMALL) if (Status == STATUS_BUFFER_TOO_SMALL)
{ {
nsb = LocalReAlloc (SidBuffer, nsb = LocalReAlloc(SidBuffer,
Length, Length,
LMEM_MOVEABLE); LMEM_MOVEABLE);
if (nsb == NULL) if (nsb == NULL)
{ {
LocalFree((HLOCAL)SidBuffer); LocalFree((HLOCAL)SidBuffer);
return FALSE; return FALSE;
} }
SidBuffer = nsb; SidBuffer = nsb;
Status = NtQueryInformationToken (hToken, Status = NtQueryInformationToken(hToken,
TokenUser, TokenUser,
(PVOID)SidBuffer, (PVOID)SidBuffer,
Length, Length,
&Length); &Length);
} }
if (!NT_SUCCESS (Status)) if (!NT_SUCCESS (Status))
{ {
LocalFree ((HLOCAL)SidBuffer); LocalFree((HLOCAL)SidBuffer);
SetLastError (RtlNtStatusToDosError (Status)); SetLastError(RtlNtStatusToDosError(Status));
return FALSE; return FALSE;
} }
DPRINT ("SidLength: %lu\n", RtlLengthSid (SidBuffer[0].Sid)); DPRINT("SidLength: %lu\n", RtlLengthSid (SidBuffer[0].Sid));
Status = RtlConvertSidToUnicodeString (SidString, Status = RtlConvertSidToUnicodeString(SidString,
SidBuffer[0].Sid, SidBuffer[0].Sid,
TRUE); TRUE);
LocalFree ((HLOCAL)SidBuffer); LocalFree((HLOCAL)SidBuffer);
if (!NT_SUCCESS (Status)) if (!NT_SUCCESS(Status))
{ {
SetLastError (RtlNtStatusToDosError (Status)); SetLastError(RtlNtStatusToDosError(Status));
return FALSE; return FALSE;
} }
DPRINT ("SidString.Length: %lu\n", SidString->Length); DPRINT("SidString.Length: %lu\n", SidString->Length);
DPRINT ("SidString.MaximumLength: %lu\n", SidString->MaximumLength); DPRINT("SidString.MaximumLength: %lu\n", SidString->MaximumLength);
DPRINT ("SidString: '%wZ'\n", SidString); DPRINT("SidString: '%wZ'\n", SidString);
return TRUE; return TRUE;
} }
PSECURITY_DESCRIPTOR PSECURITY_DESCRIPTOR
@ -284,47 +284,48 @@ DYN_MODULE DynOle32 =
* has been created! * has been created!
*/ */
BOOL BOOL
LoadDynamicImports(PDYN_MODULE Module, PDYN_FUNCS DynFuncs) LoadDynamicImports(PDYN_MODULE Module,
PDYN_FUNCS DynFuncs)
{ {
LPSTR *fname; LPSTR *fname;
PVOID *fn; PVOID *fn;
ZeroMemory(DynFuncs, sizeof(DYN_FUNCS)); ZeroMemory(DynFuncs, sizeof(DYN_FUNCS));
DynFuncs->hModule = LoadLibraryW(Module->Library); DynFuncs->hModule = LoadLibraryW(Module->Library);
if (!DynFuncs->hModule) if (!DynFuncs->hModule)
{ {
return FALSE; return FALSE;
} }
fn = &DynFuncs->fn.foo; fn = &DynFuncs->fn.foo;
/* load the imports */ /* load the imports */
for (fname = Module->Functions; *fname != NULL; fname++) for (fname = Module->Functions; *fname != NULL; fname++)
{ {
*fn = GetProcAddress(DynFuncs->hModule, *fname); *fn = GetProcAddress(DynFuncs->hModule, *fname);
if (*fn == NULL) if (*fn == NULL)
{ {
FreeLibrary(DynFuncs->hModule); FreeLibrary(DynFuncs->hModule);
DynFuncs->hModule = (HMODULE)0; DynFuncs->hModule = (HMODULE)0;
return FALSE; return FALSE;
} }
fn++; fn++;
} }
return TRUE; return TRUE;
} }
VOID VOID
UnloadDynamicImports(PDYN_FUNCS DynFuncs) UnloadDynamicImports(PDYN_FUNCS DynFuncs)
{ {
if (DynFuncs->hModule) if (DynFuncs->hModule)
{ {
FreeLibrary(DynFuncs->hModule); FreeLibrary(DynFuncs->hModule);
DynFuncs->hModule = (HMODULE)0; DynFuncs->hModule = (HMODULE)0;
} }
} }

View file

@ -18,7 +18,7 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
* FILE: lib/userenv/profile.c * FILE: dll/win32/userenv/profile.c
* PURPOSE: User profile code * PURPOSE: User profile code
* PROGRAMMERS: Eric Kohl * PROGRAMMERS: Eric Kohl
* Hervé Poussineau * Hervé Poussineau

View file

@ -19,7 +19,7 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
* FILE: lib/userenv/registry.c * FILE: dll/win32/userenv/registry.c
* PURPOSE: User profile code * PURPOSE: User profile code
* PROGRAMMER: Eric Kohl * PROGRAMMER: Eric Kohl
*/ */
@ -32,301 +32,302 @@
/* FUNCTIONS ***************************************************************/ /* FUNCTIONS ***************************************************************/
static BOOL static
CopyKey (HKEY hDstKey, BOOL
HKEY hSrcKey) CopyKey(HKEY hDstKey,
HKEY hSrcKey)
{ {
LONG Error; LONG Error;
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
Error = RegCopyTreeW(hSrcKey, Error = RegCopyTreeW(hSrcKey,
NULL, NULL,
hDstKey); hDstKey);
if (Error != ERROR_SUCCESS) if (Error != ERROR_SUCCESS)
{ {
SetLastError((DWORD)Error); SetLastError((DWORD)Error);
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
#else #else
FILETIME LastWrite; FILETIME LastWrite;
DWORD dwSubKeys; DWORD dwSubKeys;
DWORD dwValues; DWORD dwValues;
DWORD dwType; DWORD dwType;
DWORD dwMaxSubKeyNameLength; DWORD dwMaxSubKeyNameLength;
DWORD dwSubKeyNameLength; DWORD dwSubKeyNameLength;
DWORD dwMaxValueNameLength; DWORD dwMaxValueNameLength;
DWORD dwValueNameLength; DWORD dwValueNameLength;
DWORD dwMaxValueLength; DWORD dwMaxValueLength;
DWORD dwValueLength; DWORD dwValueLength;
DWORD dwDisposition; DWORD dwDisposition;
DWORD i; DWORD i;
LPWSTR lpNameBuffer; LPWSTR lpNameBuffer;
LPBYTE lpDataBuffer; LPBYTE lpDataBuffer;
HKEY hDstSubKey; HKEY hDstSubKey;
HKEY hSrcSubKey; HKEY hSrcSubKey;
DPRINT ("CopyKey() called \n"); DPRINT ("CopyKey() called \n");
Error = RegQueryInfoKey (hSrcKey, Error = RegQueryInfoKey(hSrcKey,
NULL, NULL,
NULL, NULL,
NULL, NULL,
&dwSubKeys, &dwSubKeys,
&dwMaxSubKeyNameLength, &dwMaxSubKeyNameLength,
NULL, NULL,
&dwValues, &dwValues,
&dwMaxValueNameLength, &dwMaxValueNameLength,
&dwMaxValueLength, &dwMaxValueLength,
NULL, NULL,
NULL); NULL);
if (Error != ERROR_SUCCESS) if (Error != ERROR_SUCCESS)
{ {
DPRINT1 ("RegQueryInfoKey() failed (Error %lu)\n", Error); DPRINT1("RegQueryInfoKey() failed (Error %lu)\n", Error);
SetLastError((DWORD)Error); SetLastError((DWORD)Error);
return FALSE; return FALSE;
} }
DPRINT ("dwSubKeys %lu\n", dwSubKeys); DPRINT("dwSubKeys %lu\n", dwSubKeys);
DPRINT ("dwMaxSubKeyNameLength %lu\n", dwMaxSubKeyNameLength); DPRINT("dwMaxSubKeyNameLength %lu\n", dwMaxSubKeyNameLength);
DPRINT ("dwValues %lu\n", dwValues); DPRINT("dwValues %lu\n", dwValues);
DPRINT ("dwMaxValueNameLength %lu\n", dwMaxValueNameLength); DPRINT("dwMaxValueNameLength %lu\n", dwMaxValueNameLength);
DPRINT ("dwMaxValueLength %lu\n", dwMaxValueLength); DPRINT("dwMaxValueLength %lu\n", dwMaxValueLength);
/* Copy subkeys */ /* Copy subkeys */
if (dwSubKeys != 0) if (dwSubKeys != 0)
{ {
lpNameBuffer = HeapAlloc (GetProcessHeap (), lpNameBuffer = HeapAlloc(GetProcessHeap(),
0, 0,
dwMaxSubKeyNameLength * sizeof(WCHAR)); dwMaxSubKeyNameLength * sizeof(WCHAR));
if (lpNameBuffer == NULL) if (lpNameBuffer == NULL)
{ {
DPRINT1("Buffer allocation failed\n"); DPRINT1("Buffer allocation failed\n");
SetLastError(ERROR_NOT_ENOUGH_MEMORY); SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE; return FALSE;
} }
for (i = 0; i < dwSubKeys; i++) for (i = 0; i < dwSubKeys; i++)
{ {
dwSubKeyNameLength = dwMaxSubKeyNameLength; dwSubKeyNameLength = dwMaxSubKeyNameLength;
Error = RegEnumKeyExW (hSrcKey, Error = RegEnumKeyExW(hSrcKey,
i, i,
lpNameBuffer, lpNameBuffer,
&dwSubKeyNameLength, &dwSubKeyNameLength,
NULL, NULL,
NULL, NULL,
NULL, NULL,
&LastWrite); &LastWrite);
if (Error != ERROR_SUCCESS) if (Error != ERROR_SUCCESS)
{ {
DPRINT1 ("Subkey enumeration failed (Error %lu)\n", Error); DPRINT1("Subkey enumeration failed (Error %lu)\n", Error);
HeapFree (GetProcessHeap (), HeapFree(GetProcessHeap(),
0, 0,
lpNameBuffer); lpNameBuffer);
SetLastError((DWORD)Error); SetLastError((DWORD)Error);
return FALSE; return FALSE;
} }
Error = RegCreateKeyExW (hDstKey, Error = RegCreateKeyExW(hDstKey,
lpNameBuffer, lpNameBuffer,
0, 0,
NULL, NULL,
REG_OPTION_NON_VOLATILE, REG_OPTION_NON_VOLATILE,
KEY_WRITE, KEY_WRITE,
NULL, NULL,
&hDstSubKey, &hDstSubKey,
&dwDisposition); &dwDisposition);
if (Error != ERROR_SUCCESS) if (Error != ERROR_SUCCESS)
{ {
DPRINT1 ("Subkey creation failed (Error %lu)\n", Error); DPRINT1("Subkey creation failed (Error %lu)\n", Error);
HeapFree (GetProcessHeap (), HeapFree(GetProcessHeap(),
0, 0,
lpNameBuffer); lpNameBuffer);
SetLastError((DWORD)Error); SetLastError((DWORD)Error);
return FALSE; return FALSE;
} }
Error = RegOpenKeyExW (hSrcKey, Error = RegOpenKeyExW(hSrcKey,
lpNameBuffer, lpNameBuffer,
0, 0,
KEY_READ, KEY_READ,
&hSrcSubKey); &hSrcSubKey);
if (Error != ERROR_SUCCESS) if (Error != ERROR_SUCCESS)
{ {
DPRINT1 ("Error: %lu\n", Error); DPRINT1("Error: %lu\n", Error);
RegCloseKey (hDstSubKey); RegCloseKey(hDstSubKey);
HeapFree (GetProcessHeap (), HeapFree(GetProcessHeap(),
0, 0,
lpNameBuffer); lpNameBuffer);
SetLastError((DWORD)Error); SetLastError((DWORD)Error);
return FALSE; return FALSE;
} }
if (!CopyKey (hDstSubKey, if (!CopyKey(hDstSubKey,
hSrcSubKey)) hSrcSubKey))
{ {
DPRINT1 ("Error: %lu\n", GetLastError()); DPRINT1("Error: %lu\n", GetLastError());
RegCloseKey (hSrcSubKey); RegCloseKey (hSrcSubKey);
RegCloseKey (hDstSubKey); RegCloseKey (hDstSubKey);
HeapFree (GetProcessHeap (), HeapFree(GetProcessHeap(),
0, 0,
lpNameBuffer); lpNameBuffer);
return FALSE; return FALSE;
} }
RegCloseKey (hSrcSubKey); RegCloseKey(hSrcSubKey);
RegCloseKey (hDstSubKey); RegCloseKey(hDstSubKey);
} }
HeapFree (GetProcessHeap (), HeapFree(GetProcessHeap(),
0, 0,
lpNameBuffer); lpNameBuffer);
} }
/* Copy values */ /* Copy values */
if (dwValues != 0) if (dwValues != 0)
{ {
lpNameBuffer = HeapAlloc (GetProcessHeap (), lpNameBuffer = HeapAlloc(GetProcessHeap(),
0, 0,
dwMaxValueNameLength * sizeof(WCHAR)); dwMaxValueNameLength * sizeof(WCHAR));
if (lpNameBuffer == NULL) if (lpNameBuffer == NULL)
{ {
DPRINT1 ("Buffer allocation failed\n"); DPRINT1("Buffer allocation failed\n");
SetLastError(ERROR_NOT_ENOUGH_MEMORY); SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE; return FALSE;
} }
lpDataBuffer = HeapAlloc (GetProcessHeap (), lpDataBuffer = HeapAlloc(GetProcessHeap(),
0, 0,
dwMaxValueLength); dwMaxValueLength);
if (lpDataBuffer == NULL) if (lpDataBuffer == NULL)
{ {
DPRINT1 ("Buffer allocation failed\n"); DPRINT1("Buffer allocation failed\n");
HeapFree (GetProcessHeap (), HeapFree(GetProcessHeap(),
0, 0,
lpNameBuffer); lpNameBuffer);
SetLastError(ERROR_NOT_ENOUGH_MEMORY); SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE; return FALSE;
} }
for (i = 0; i < dwValues; i++) for (i = 0; i < dwValues; i++)
{ {
dwValueNameLength = dwMaxValueNameLength; dwValueNameLength = dwMaxValueNameLength;
dwValueLength = dwMaxValueLength; dwValueLength = dwMaxValueLength;
Error = RegEnumValueW (hSrcKey, Error = RegEnumValueW(hSrcKey,
i, i,
lpNameBuffer, lpNameBuffer,
&dwValueNameLength, &dwValueNameLength,
NULL, NULL,
&dwType, &dwType,
lpDataBuffer, lpDataBuffer,
&dwValueLength); &dwValueLength);
if (Error != ERROR_SUCCESS) if (Error != ERROR_SUCCESS)
{ {
DPRINT1("Error: %lu\n", Error); DPRINT1("Error: %lu\n", Error);
HeapFree (GetProcessHeap (), HeapFree(GetProcessHeap(),
0, 0,
lpDataBuffer); lpDataBuffer);
HeapFree (GetProcessHeap (), HeapFree(GetProcessHeap(),
0, 0,
lpNameBuffer); lpNameBuffer);
SetLastError((DWORD)Error); SetLastError((DWORD)Error);
return FALSE; return FALSE;
} }
Error = RegSetValueExW (hDstKey, Error = RegSetValueExW(hDstKey,
lpNameBuffer, lpNameBuffer,
0, 0,
dwType, dwType,
lpDataBuffer, lpDataBuffer,
dwValueLength); dwValueLength);
if (Error != ERROR_SUCCESS) if (Error != ERROR_SUCCESS)
{ {
DPRINT1("Error: %lu\n", Error); DPRINT1("Error: %lu\n", Error);
HeapFree (GetProcessHeap (), HeapFree(GetProcessHeap(),
0, 0,
lpDataBuffer); lpDataBuffer);
HeapFree (GetProcessHeap (), HeapFree(GetProcessHeap(),
0, 0,
lpNameBuffer); lpNameBuffer);
SetLastError((DWORD)Error); SetLastError((DWORD)Error);
return FALSE; return FALSE;
} }
} }
HeapFree (GetProcessHeap (), HeapFree(GetProcessHeap(),
0, 0,
lpDataBuffer); lpDataBuffer);
HeapFree (GetProcessHeap (), HeapFree(GetProcessHeap(),
0, 0,
lpNameBuffer); lpNameBuffer);
} }
DPRINT ("CopyKey() done \n"); DPRINT("CopyKey() done \n");
return TRUE; return TRUE;
#endif #endif
} }
BOOL BOOL
CreateUserHive (LPCWSTR lpKeyName, CreateUserHive(LPCWSTR lpKeyName,
LPCWSTR lpProfilePath) LPCWSTR lpProfilePath)
{ {
HKEY hDefaultKey = NULL; HKEY hDefaultKey = NULL;
HKEY hUserKey = NULL; HKEY hUserKey = NULL;
LONG Error; LONG Error;
BOOL Ret = FALSE; BOOL Ret = FALSE;
DPRINT ("CreateUserHive(%S) called\n", lpKeyName); DPRINT("CreateUserHive(%S) called\n", lpKeyName);
Error = RegOpenKeyExW (HKEY_USERS, Error = RegOpenKeyExW(HKEY_USERS,
L".Default", L".Default",
0, 0,
KEY_READ, KEY_READ,
&hDefaultKey); &hDefaultKey);
if (Error != ERROR_SUCCESS) if (Error != ERROR_SUCCESS)
{ {
SetLastError((DWORD)Error); SetLastError((DWORD)Error);
goto Cleanup; goto Cleanup;
} }
Error = RegOpenKeyExW (HKEY_USERS, Error = RegOpenKeyExW(HKEY_USERS,
lpKeyName, lpKeyName,
0, 0,
KEY_ALL_ACCESS, KEY_ALL_ACCESS,
&hUserKey); &hUserKey);
if (Error != ERROR_SUCCESS) if (Error != ERROR_SUCCESS)
{ {
SetLastError((DWORD)Error); SetLastError((DWORD)Error);
goto Cleanup; goto Cleanup;
} }
if (!CopyKey(hUserKey, hDefaultKey)) if (!CopyKey(hUserKey, hDefaultKey))
{ {
goto Cleanup; goto Cleanup;
} }
if (!UpdateUsersShellFolderSettings(lpProfilePath, if (!UpdateUsersShellFolderSettings(lpProfilePath,
hUserKey)) hUserKey))
{ {
goto Cleanup; goto Cleanup;
} }
RegFlushKey (hUserKey); RegFlushKey(hUserKey);
Ret = TRUE; Ret = TRUE;
Cleanup: Cleanup:
if (hUserKey != NULL) if (hUserKey != NULL)
RegCloseKey (hUserKey); RegCloseKey (hUserKey);
if (hDefaultKey != NULL) if (hDefaultKey != NULL)
RegCloseKey (hDefaultKey); RegCloseKey (hDefaultKey);
return Ret; return Ret;
} }
/* EOF */ /* EOF */

View file

@ -19,7 +19,7 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
* FILE: lib/userenv/resource.h * FILE: dll/win32/userenv/resource.h
* PURPOSE: Resource IDs * PURPOSE: Resource IDs
* PROGRAMMER: Eric Kohl * PROGRAMMER: Eric Kohl
*/ */

View file

@ -19,7 +19,7 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
* FILE: lib/userenv/setup.c * FILE: dll/win32/userenv/setup.c
* PURPOSE: Profile setup functions * PURPOSE: Profile setup functions
* PROGRAMMER: Eric Kohl * PROGRAMMER: Eric Kohl
*/ */

View file

@ -19,7 +19,7 @@
/* /*
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
* FILE: lib/userenv/userenv.c * FILE: dll/win32/userenv/userenv.c
* PURPOSE: DLL initialization code * PURPOSE: DLL initialization code
* PROGRAMMER: Eric Kohl * PROGRAMMER: Eric Kohl
*/ */
@ -31,20 +31,21 @@
HINSTANCE hInstance = NULL; HINSTANCE hInstance = NULL;
BOOL WINAPI BOOL
DllMain (HINSTANCE hinstDLL, WINAPI
DWORD fdwReason, DllMain(HINSTANCE hinstDLL,
LPVOID lpvReserved) DWORD fdwReason,
LPVOID lpvReserved)
{ {
if (fdwReason == DLL_PROCESS_ATTACH) if (fdwReason == DLL_PROCESS_ATTACH)
{ {
hInstance = hinstDLL; hInstance = hinstDLL;
InitializeGPNotifications(); InitializeGPNotifications();
} }
else if (fdwReason == DLL_PROCESS_DETACH) else if (fdwReason == DLL_PROCESS_DETACH)
{ {
UninitializeGPNotifications(); UninitializeGPNotifications();
} }
return TRUE; return TRUE;
} }