mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 04:20:46 +00:00
[USERENV]
Implement stubs for userenv.dll. Patch by Hermes Belusca. See issue #7184 for more details. svn path=/trunk/; revision=56904
This commit is contained in:
parent
dd13d207ef
commit
1db5a7aa08
3 changed files with 73 additions and 28 deletions
|
@ -75,31 +75,6 @@ AppendSystemPostfix(LPWSTR lpName,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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
|
static
|
||||||
BOOL
|
BOOL
|
||||||
AcquireRemoveRestorePrivilege(IN BOOL bAcquire)
|
AcquireRemoveRestorePrivilege(IN BOOL bAcquire)
|
||||||
|
@ -147,6 +122,29 @@ 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
|
BOOL
|
||||||
WINAPI
|
WINAPI
|
||||||
CreateUserProfileW(PSID Sid,
|
CreateUserProfileW(PSID Sid,
|
||||||
|
@ -393,6 +391,34 @@ Done:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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
|
BOOL
|
||||||
WINAPI
|
WINAPI
|
||||||
GetAllUsersProfileDirectoryA(LPSTR lpProfileDir,
|
GetAllUsersProfileDirectoryA(LPSTR lpProfileDir,
|
||||||
|
@ -1305,4 +1331,13 @@ DeleteProfileA(LPCSTR lpSidString,
|
||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BOOL
|
||||||
|
WINAPI
|
||||||
|
GetProfileType(OUT PDWORD pdwFlags)
|
||||||
|
{
|
||||||
|
DPRINT1("GetProfileType() not implemented!\n");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
196 stub GetGPOListW #stdcall GetGPOListW(ptr wstr wstr wstr long ptr)
|
196 stub GetGPOListW #stdcall GetGPOListW(ptr wstr wstr wstr long ptr)
|
||||||
197 stub GetNextFgPolicyRefreshInfo #stdcall GetNextFgPolicyRefreshInfo(8)
|
197 stub GetNextFgPolicyRefreshInfo #stdcall GetNextFgPolicyRefreshInfo(8)
|
||||||
198 stub GetPreviousFgPolicyRefreshInfo #stdcall GetPreviousFgPolicyRefreshInfo(8)
|
198 stub GetPreviousFgPolicyRefreshInfo #stdcall GetPreviousFgPolicyRefreshInfo(8)
|
||||||
199 stub GetProfileType #stdcall GetProfileType(ptr)
|
199 stdcall GetProfileType(ptr)
|
||||||
202 stdcall GetProfilesDirectoryA(str ptr)
|
202 stdcall GetProfilesDirectoryA(str ptr)
|
||||||
203 stdcall GetProfilesDirectoryW(wstr ptr)
|
203 stdcall GetProfilesDirectoryW(wstr ptr)
|
||||||
204 stdcall GetUserProfileDirectoryA(ptr str ptr)
|
204 stdcall GetUserProfileDirectoryA(ptr str ptr)
|
||||||
|
@ -96,8 +96,8 @@
|
||||||
150 stub -noname SignalUserPolicyForegroundProcessingDone #stdcall -noname SignalUserPolicyForegroundProcessingDone()
|
150 stub -noname SignalUserPolicyForegroundProcessingDone #stdcall -noname SignalUserPolicyForegroundProcessingDone()
|
||||||
151 stub -noname SignalMachinePolicyForegroundProcessingDone #stdcall -noname SignalMachinePolicyForegroundProcessingDone()
|
151 stub -noname SignalMachinePolicyForegroundProcessingDone #stdcall -noname SignalMachinePolicyForegroundProcessingDone()
|
||||||
152 stub -noname IsSyncForegroundPolicyRefresh #stdcall -noname IsSyncForegroundPolicyRefresh(8)
|
152 stub -noname IsSyncForegroundPolicyRefresh #stdcall -noname IsSyncForegroundPolicyRefresh(8)
|
||||||
153 stub -noname CreateUserProfileExA #stdcall -noname CreateUserProfileExA(24)
|
153 stdcall -noname CreateUserProfileExA(ptr str str str long long)
|
||||||
154 stub -noname CreateUserProfileExW #stdcall -noname CreateUserProfileExW(24)
|
154 stdcall -noname CreateUserProfileExW(ptr wstr wstr wstr long long)
|
||||||
155 stub -noname CopySystemProfile #stdcall -noname CopySystemProfile(4)
|
155 stub -noname CopySystemProfile #stdcall -noname CopySystemProfile(4)
|
||||||
156 stub -noname GetUserProfileDirFromSidA #stdcall -noname GetUserProfileDirFromSidA(12)
|
156 stub -noname GetUserProfileDirFromSidA #stdcall -noname GetUserProfileDirFromSidA(12)
|
||||||
157 stub -noname GetUserProfileDirFromSidW #stdcall -noname GetUserProfileDirFromSidW(12)
|
157 stub -noname GetUserProfileDirFromSidW #stdcall -noname GetUserProfileDirFromSidW(12)
|
||||||
|
|
|
@ -12,6 +12,13 @@ extern "C" {
|
||||||
#define RP_FORCE (1)
|
#define RP_FORCE (1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Values returned by GetProfileType */
|
||||||
|
#if (WINVER >= 0x0500)
|
||||||
|
#define PT_TEMPORARY 1
|
||||||
|
#define PT_ROAMING 2
|
||||||
|
#define PT_MANDATORY 4
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _PROFILEINFOA
|
typedef struct _PROFILEINFOA
|
||||||
{
|
{
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
|
@ -67,6 +74,9 @@ BOOL WINAPI GetProfilesDirectoryA(LPSTR, LPDWORD);
|
||||||
BOOL WINAPI GetProfilesDirectoryW(LPWSTR, LPDWORD);
|
BOOL WINAPI GetProfilesDirectoryW(LPWSTR, LPDWORD);
|
||||||
BOOL WINAPI GetUserProfileDirectoryA(HANDLE, LPSTR, LPDWORD);
|
BOOL WINAPI GetUserProfileDirectoryA(HANDLE, LPSTR, LPDWORD);
|
||||||
BOOL WINAPI GetUserProfileDirectoryW(HANDLE, LPWSTR, LPDWORD);
|
BOOL WINAPI GetUserProfileDirectoryW(HANDLE, LPWSTR, LPDWORD);
|
||||||
|
#if (WINVER >= 0x0500)
|
||||||
|
BOOL WINAPI GetProfileType(PDWORD);
|
||||||
|
#endif
|
||||||
|
|
||||||
BOOL WINAPI CreateEnvironmentBlock(LPVOID*, HANDLE, BOOL);
|
BOOL WINAPI CreateEnvironmentBlock(LPVOID*, HANDLE, BOOL);
|
||||||
BOOL WINAPI DestroyEnvironmentBlock(LPVOID);
|
BOOL WINAPI DestroyEnvironmentBlock(LPVOID);
|
||||||
|
|
Loading…
Reference in a new issue