/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
- * FILE: lib/userenv/profile.c
+ * FILE: dll/win32/userenv/profile.c
* PURPOSE: User profile code
* PROGRAMMERS: Eric Kohl
* Hervé Poussineau
*/
-#include <precomp.h>
+#include "precomp.h"
#define NDEBUG
#include <debug.h>
}
-BOOL
-WINAPI
-CreateUserProfileA(PSID Sid,
- LPCSTR lpUserName)
-{
- UNICODE_STRING UserName;
- BOOL bResult;
- NTSTATUS Status;
-
- Status = RtlCreateUnicodeStringFromAsciiz(&UserName,
- (LPSTR)lpUserName);
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- bResult = CreateUserProfileW(Sid, UserName.Buffer);
-
- RtlFreeUnicodeString(&UserName);
-
- return bResult;
-}
-
-
static
BOOL
AcquireRemoveRestorePrivilege(IN BOOL bAcquire)
}
+BOOL
+WINAPI
+CreateUserProfileA(PSID Sid,
+ LPCSTR lpUserName)
+{
+ UNICODE_STRING UserName;
+ BOOL bResult;
+
+ if (!RtlCreateUnicodeStringFromAsciiz(&UserName,
+ (LPSTR)lpUserName))
+ {
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return FALSE;
+ }
+
+ bResult = CreateUserProfileW(Sid, UserName.Buffer);
+
+ RtlFreeUnicodeString(&UserName);
+
+ return bResult;
+}
+
+
BOOL
WINAPI
CreateUserProfileW(PSID Sid,
}
+BOOL
+WINAPI
+CreateUserProfileExA(IN PSID pSid,
+ IN LPCSTR lpUserName,
+ IN LPCSTR lpUserHive OPTIONAL,
+ OUT LPSTR lpProfileDir OPTIONAL,
+ IN DWORD dwDirSize,
+ IN BOOL bWin9xUpg)
+{
+ DPRINT1("CreateUserProfileExA() not implemented!\n");
+ return FALSE;
+}
+
+
+BOOL
+WINAPI
+CreateUserProfileExW(IN PSID pSid,
+ IN LPCWSTR lpUserName,
+ IN LPCWSTR lpUserHive OPTIONAL,
+ OUT LPWSTR lpProfileDir OPTIONAL,
+ IN DWORD dwDirSize,
+ IN BOOL bWin9xUpg)
+{
+ DPRINT1("CreateUserProfileExW() not implemented!\n");
+ return FALSE;
+}
+
+
BOOL
WINAPI
GetAllUsersProfileDirectoryA(LPSTR lpProfileDir,
SidString.Buffer,
szUserHivePath);
AcquireRemoveRestorePrivilege(FALSE);
+
+ /* HACK: Do not fail if the profile has already been loaded! */
+ if (Error == ERROR_SHARING_VIOLATION)
+ Error = ERROR_SUCCESS;
+
if (Error != ERROR_SUCCESS)
{
DPRINT1("RegLoadKeyW() failed (Error %ld)\n", Error);
return bResult;
}
+
+BOOL
+WINAPI
+GetProfileType(OUT PDWORD pdwFlags)
+{
+ DPRINT1("GetProfileType() not implemented!\n");
+ return FALSE;
+}
+
/* EOF */