Author: ekohl
Date: Sun Jul 15 21:23:22 2012
New Revision: 56904
URL:
http://svn.reactos.org/svn/reactos?rev=56904&view=rev
Log:
[USERENV]
Implement stubs for userenv.dll.
Patch by Hermes Belusca.
See issue #7184 for more details.
Modified:
trunk/reactos/dll/win32/userenv/profile.c
trunk/reactos/dll/win32/userenv/userenv.spec
trunk/reactos/include/psdk/userenv.h
Modified: trunk/reactos/dll/win32/userenv/profile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/userenv/profile.…
==============================================================================
--- trunk/reactos/dll/win32/userenv/profile.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/userenv/profile.c [iso-8859-1] Sun Jul 15 21:23:22 2012
@@ -75,31 +75,6 @@
}
-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)
@@ -144,6 +119,29 @@
}
return bRet;
+}
+
+
+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;
}
@@ -390,6 +388,34 @@
DPRINT("CreateUserProfileW() done\n");
return bRet;
+}
+
+
+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;
}
@@ -1305,4 +1331,13 @@
return bResult;
}
+
+BOOL
+WINAPI
+GetProfileType(OUT PDWORD pdwFlags)
+{
+ DPRINT1("GetProfileType() not implemented!\n");
+ return FALSE;
+}
+
/* EOF */
Modified: trunk/reactos/dll/win32/userenv/userenv.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/userenv/userenv.…
==============================================================================
--- trunk/reactos/dll/win32/userenv/userenv.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/userenv/userenv.spec [iso-8859-1] Sun Jul 15 21:23:22 2012
@@ -24,7 +24,7 @@
196 stub GetGPOListW #stdcall
GetGPOListW(ptr wstr wstr wstr long ptr)
197 stub GetNextFgPolicyRefreshInfo #stdcall
GetNextFgPolicyRefreshInfo(8)
198 stub GetPreviousFgPolicyRefreshInfo #stdcall
GetPreviousFgPolicyRefreshInfo(8)
-199 stub GetProfileType #stdcall
GetProfileType(ptr)
+199 stdcall GetProfileType(ptr)
202 stdcall GetProfilesDirectoryA(str ptr)
203 stdcall GetProfilesDirectoryW(wstr ptr)
204 stdcall GetUserProfileDirectoryA(ptr str ptr)
@@ -96,8 +96,8 @@
150 stub -noname SignalUserPolicyForegroundProcessingDone #stdcall -noname
SignalUserPolicyForegroundProcessingDone()
151 stub -noname SignalMachinePolicyForegroundProcessingDone #stdcall -noname
SignalMachinePolicyForegroundProcessingDone()
152 stub -noname IsSyncForegroundPolicyRefresh #stdcall -noname
IsSyncForegroundPolicyRefresh(8)
-153 stub -noname CreateUserProfileExA #stdcall -noname
CreateUserProfileExA(24)
-154 stub -noname CreateUserProfileExW #stdcall -noname
CreateUserProfileExW(24)
+153 stdcall -noname CreateUserProfileExA(ptr str str str long long)
+154 stdcall -noname CreateUserProfileExW(ptr wstr wstr wstr long long)
155 stub -noname CopySystemProfile #stdcall -noname
CopySystemProfile(4)
156 stub -noname GetUserProfileDirFromSidA #stdcall -noname
GetUserProfileDirFromSidA(12)
157 stub -noname GetUserProfileDirFromSidW #stdcall -noname
GetUserProfileDirFromSidW(12)
Modified: trunk/reactos/include/psdk/userenv.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/userenv.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/userenv.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/userenv.h [iso-8859-1] Sun Jul 15 21:23:22 2012
@@ -10,6 +10,13 @@
#if (WINVER >= 0x0500)
#define RP_FORCE (1)
+#endif
+
+/* Values returned by GetProfileType */
+#if (WINVER >= 0x0500)
+#define PT_TEMPORARY 1
+#define PT_ROAMING 2
+#define PT_MANDATORY 4
#endif
typedef struct _PROFILEINFOA
@@ -67,6 +74,9 @@
BOOL WINAPI GetProfilesDirectoryW(LPWSTR, LPDWORD);
BOOL WINAPI GetUserProfileDirectoryA(HANDLE, LPSTR, LPDWORD);
BOOL WINAPI GetUserProfileDirectoryW(HANDLE, LPWSTR, LPDWORD);
+#if (WINVER >= 0x0500)
+BOOL WINAPI GetProfileType(PDWORD);
+#endif
BOOL WINAPI CreateEnvironmentBlock(LPVOID*, HANDLE, BOOL);
BOOL WINAPI DestroyEnvironmentBlock(LPVOID);