39 szSystemRoot[2] =
L'.';
40 lpszPostfix = &szSystemRoot[2];
41 lpszPtr = lpszPostfix;
42 while (*lpszPtr != (
WCHAR)0)
44 if (*lpszPtr ==
L'\\')
51 DPRINT1(
"Error: buffer overflow\n");
70 DPRINT(
"AcquireRemoveRestorePrivilege(%d)\n", bAcquire);
89 DPRINT1(
"AdjustTokenPrivileges() succeeded, but with not all privileges assigned\n");
116 DPRINT(
"CheckForLoadedProfile() called\n");
121 DPRINT1(
"GetUserSidStringFromToken() failed\n");
131 DPRINT(
"Profile not loaded\n");
140 DPRINT(
"Profile already loaded\n");
158 (
wcslen(
L"Global\\userenv: User Profile Mutex for ") +
wcslen(pszSidString) + 1) *
sizeof(
WCHAR));
159 if (pszMutexName ==
NULL)
161 DPRINT(
"Failed to allocate the mutex name buffer!\n");
167 wcscpy(pszMutexName,
L"Global\\userenv: User Profile Mutex for ");
168 wcscat(pszMutexName, pszSidString);
181 SecurityAttributes.
nLength =
sizeof(SecurityAttributes);
210 DPRINT1(
"IncrementRefCount(%S %p)\n",
211 pszSidString, pdwRefCount);
214 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
220 DPRINT1(
"Error: %lu\n", dwError);
231 DPRINT1(
"Error: %lu\n", dwError);
255 DPRINT1(
"Error: %lu\n", dwError);
259 if (pdwRefCount !=
NULL)
260 *pdwRefCount = dwRefCount;
263 if (hProfileKey !=
NULL)
266 if (hProfilesKey !=
NULL)
283 DPRINT1(
"DecrementRefCount(%S %p)\n",
284 pszSidString, pdwRefCount);
287 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
293 DPRINT1(
"Error: %lu\n", dwError);
304 DPRINT1(
"Error: %lu\n", dwError);
318 DPRINT1(
"Error: %lu\n", dwError);
333 DPRINT1(
"Error: %lu\n", dwError);
337 if (pdwRefCount !=
NULL)
338 *pdwRefCount = dwRefCount;
341 if (hProfileKey !=
NULL)
344 if (hProfilesKey !=
NULL)
363 DPRINT(
"CheckForGuestsAndAdmins(%p %p)\n", hToken, pdwState);
371 DPRINT1(
"GetTokenInformation() failed (Error %lu)\n", dwError);
380 if (pGroupInfo ==
NULL)
383 DPRINT1(
"HeapAlloc() failed (Error %lu)\n", dwError);
391 DPRINT1(
"GetTokenInformation() failed (Error %lu)\n", dwError);
401 &pAdministratorsSID))
404 DPRINT1(
"AllocateAndInitializeSid() failed (Error %lu)\n", dwError);
417 DPRINT1(
"AllocateAndInitializeSid() failed (Error %lu)\n", dwError);
438 if (pGuestsSID !=
NULL)
441 if (pAdministratorsSID !=
NULL)
444 if (pGroupInfo !=
NULL)
463 DPRINT(
"SetProfileData(%S %p)\n", pszSidString, hToken);
466 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
472 DPRINT1(
"Error: %lu\n", dwError);
483 DPRINT1(
"Error: %lu\n", dwError);
492 L"ProfileLoadTimeLow",
499 DPRINT1(
"Error: %lu\n", dwError);
505 L"ProfileLoadTimeHigh",
512 DPRINT1(
"Error: %lu\n", dwError);
525 DPRINT1(
"Error: %lu\n", dwError);
533 DPRINT1(
"Error: %lu\n", dwError);
546 DPRINT1(
"Error: %lu\n", dwError);
551 if (hProfileKey !=
NULL)
554 if (hProfilesKey !=
NULL)
581 DPRINT1(
"CopySystemProfile()\n");
592 if (pUserSid ==
NULL)
601 DPRINT1(
"GetUserSidStringFromToken() failed\n");
606 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\");
620 DPRINT1(
"Failed to create the profile key for the %s profile (Error %lu)\n",
621 SidString.
Buffer, dwError);
633 DPRINT1(
"Failed to set the SID value (Error %lu)\n", dwError);
638 L"%systemroot%\\system32\\config\\systemprofile");
644 (
PBYTE)szRawProfilePath,
648 DPRINT1(
"Failed to set the ProfileImagePath value (Error %lu)\n", dwError);
673 cchSize =
ARRAYSIZE(szDefaultProfilePath);
691 if (hProfileKey !=
NULL)
696 if (pUserSid !=
NULL)
716 DPRINT(
"CreateUserProfileA(%p %s)\n",
pSid, lpUserName);
721 if (pUserNameW ==
NULL)
748 DPRINT(
"CreateUserProfileW(%p %S)\n",
pSid, lpUserName);
776 DPRINT(
"CreateUserProfileExA(%p %s %s %p %lu %d)\n",
777 pSid, lpUserName, lpUserHive, lpProfileDir, dwDirSize, bWin9xUpg);
780 if (lpProfileDir !=
NULL && dwDirSize == 0)
789 if (pUserNameW ==
NULL)
797 if (lpUserHive !=
NULL)
801 if (pUserHiveW ==
NULL)
810 if (lpProfileDir !=
NULL)
813 if (pProfileDirW ==
NULL)
829 if (bResult && lpProfileDir !=
NULL)
836 if (pProfileDirW !=
NULL)
839 if (pUserHiveW !=
NULL)
842 if (pUserNameW !=
NULL)
873 DPRINT(
"CreateUserProfileExW(%p %S %S %p %lu %d)\n",
874 pSid, lpUserName, lpUserHive, lpProfileDir, dwDirSize, bWin9xUpg);
877 if (!
pSid || !lpUserName)
890 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
902 dwLength =
sizeof(szRawProfilesPath);
904 L"ProfilesDirectory",
907 (
LPBYTE)szRawProfilesPath,
941 L"DefaultUserProfile",
956 StringCbCopyW(szUserProfileName,
sizeof(szUserProfileName), lpUserName);
960 StringCbCopyW(szUserProfilePath,
sizeof(szUserProfilePath), szProfilesPath);
961 StringCbCatW(szUserProfilePath,
sizeof(szUserProfilePath),
L"\\");
962 StringCbCatW(szUserProfilePath,
sizeof(szUserProfilePath), szUserProfileName);
973 for (
i = 0;
i < 1000;
i++)
975 swprintf(szUserProfileName,
L"%s.%03u", lpUserName,
i);
977 StringCbCopyW(szUserProfilePath,
sizeof(szUserProfilePath), szProfilesPath);
978 StringCbCatW(szUserProfilePath,
sizeof(szUserProfilePath),
L"\\");
979 StringCbCatW(szUserProfilePath,
sizeof(szUserProfilePath), szUserProfileName);
995 StringCbCopyW(szDefaultUserPath,
sizeof(szDefaultUserPath), szProfilesPath);
996 StringCbCatW(szDefaultUserPath,
sizeof(szDefaultUserPath),
L"\\");
997 StringCbCatW(szDefaultUserPath,
sizeof(szDefaultUserPath), szBuffer);
1015 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\");
1036 StringCbCopyW(szBuffer,
sizeof(szBuffer), szRawProfilesPath);
1038 StringCbCatW(szBuffer,
sizeof(szBuffer), szUserProfileName);
1042 L"ProfileImagePath",
1075 StringCbCopyW(szBuffer,
sizeof(szBuffer), szUserProfilePath);
1116 if (lpProfileDir && dwDirSize)
1123 DPRINT(
"CreateUserProfileExW() done\n");
1139 DPRINT(
"DeleteProfileA() called\n");
1144 (
LPSTR)lpSidString);
1148 (
LPSTR)lpProfilePath);
1157 ComputerName.Buffer);
1188 if (lpSidString ==
NULL)
1194 if (lpProfilePath !=
NULL)
1197 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
1203 DPRINT1(
"Error: %lu\n", dwError);
1214 DPRINT1(
"Error: %lu\n", dwError);
1219 dwLength =
sizeof(szRawProfilePath);
1221 L"ProfileImagePath",
1224 (
PBYTE)szRawProfilePath,
1228 DPRINT1(
"Error: %lu\n", dwError);
1237 DPRINT1(
"Failled to expand the raw profile path (Error %lu)\n", dwError);
1246 DPRINT(
"ProfilePath: %S\n", szProfilePath);
1251 DPRINT1(
"Error: %lu\n", dwError);
1258 if (hProfileKey !=
NULL)
1261 if (hProfilesKey !=
NULL)
1284 *lpcchSize *
sizeof(
WCHAR));
1290 if (bResult && lpProfileDir)
1327 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
1341 L"ProfilesDirectory",
1383 StringCbCatW(szProfilePath,
sizeof(szProfilePath), szBuffer);
1386 if (lpProfileDir && (*lpcchSize >=
dwLength))
1417 *lpcchSize *
sizeof(
WCHAR));
1423 if (bResult && lpProfileDir)
1460 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
1474 L"ProfilesDirectory",
1500 L"DefaultUserProfile",
1516 StringCbCatW(szProfilePath,
sizeof(szProfilePath), szBuffer);
1519 if (lpProfileDir && (*lpcchSize >=
dwLength))
1543 if (!lpcchSize || !lpProfileDir)
1550 *lpcchSize *
sizeof(
WCHAR));
1556 if (bResult && lpProfileDir)
1593 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
1607 L"ProfilesDirectory",
1632 if (lpProfilesDir && (*lpcchSize >=
dwLength))
1659 DPRINT(
"GetProfileType(%p)\n", pdwFlags);
1661 if (pdwFlags ==
NULL)
1679 DPRINT1(
"GetUserSidStringFromToken() failed\n");
1683 DPRINT(
"SID: %wZ\n", &SidString);
1686 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
1692 DPRINT1(
"Error: %lu\n", dwError);
1704 DPRINT1(
"Error: %lu\n", dwError);
1719 DPRINT1(
"Error: %lu\n", dwError);
1727 *pdwFlags |= PT_TEMPORARY;
1734 if (hProfileKey !=
NULL)
1737 if (hProfilesKey !=
NULL)
1758 if (!lpcchSize || !lpProfileDir)
1765 *lpcchSize *
sizeof(
WCHAR));
1772 if (bResult && lpProfileDir)
1820 DPRINT1(
"GetUserSidStringFromToken() failed\n");
1824 DPRINT(
"SidString: '%wZ'\n", &SidString);
1827 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\");
1832 DPRINT(
"KeyName: '%S'\n", szKeyName);
1848 L"ProfileImagePath",
1863 DPRINT(
"RawImagePath: '%S'\n", szRawImagePath);
1874 DPRINT(
"ImagePath: '%S'\n", szImagePath);
1877 if (lpProfileDir && (*lpcchSize >=
dwLength))
1902 DPRINT(
"LoadUserProfileA() called\n");
1905 if (!lpProfileInfo || (lpProfileInfo->dwSize !=
sizeof(
PROFILEINFOA)) ||
1906 (lpProfileInfo->lpUserName ==
NULL) || (lpProfileInfo->lpUserName[0] == 0))
1913 ProfileInfoW.
dwSize =
sizeof(ProfileInfoW);
1914 ProfileInfoW.
dwFlags = lpProfileInfo->dwFlags;
1916 if (lpProfileInfo->lpUserName)
1928 if (lpProfileInfo->lpProfilePath)
1940 if (lpProfileInfo->lpDefaultPath)
1952 if (lpProfileInfo->lpServerName)
1980 lpProfileInfo->hProfile = ProfileInfoW.
hProfile;
2015 DWORD dwLength =
sizeof(szUserHivePath) /
sizeof(szUserHivePath[0]);
2017 DPRINT(
"LoadUserProfileW(%p %p)\n", hToken, lpProfileInfo);
2020 if (!lpProfileInfo || (lpProfileInfo->dwSize !=
sizeof(
PROFILEINFOW)) ||
2021 (lpProfileInfo->lpUserName ==
NULL) || (lpProfileInfo->lpUserName[0] == 0))
2027 DPRINT(
"UserName: %S\n", lpProfileInfo->lpUserName);
2033 DPRINT1(
"GetUserSidStringFromToken() failed\n");
2040 if (hProfileMutex ==
NULL)
2042 DPRINT1(
"Failed to create the profile mutex\n");
2058 if (lpProfileInfo->lpProfilePath)
2061 StringCbCopyW(szUserHivePath,
sizeof(szUserHivePath), lpProfileInfo->lpProfilePath);
2074 StringCbCatW(szUserHivePath,
sizeof(szUserHivePath),
L"\\");
2075 StringCbCatW(szUserHivePath,
sizeof(szUserHivePath), lpProfileInfo->lpUserName);
2076 StringCbCatW(szUserHivePath,
sizeof(szUserHivePath),
L"\\ntuser.dat");
2077 DPRINT(
"szUserHivePath: %S\n", szUserHivePath);
2086 DPRINT1 (
"GetTokenInformation() failed\n");
2093 DPRINT1(
"HeapAlloc() failed\n");
2100 DPRINT1(
"GetTokenInformation() failed\n");
2108 DPRINT1(
"CreateUserProfileW() failed\n");
2138 lpProfileInfo->dwFlags,
2147 (
PHKEY)&lpProfileInfo->hProfile);
2150 DPRINT1(
"RegOpenKeyExW() failed (Error %ld)\n",
Error);
2158 DPRINT1(
"IncrementRefCount() failed (Error %ld)\n",
Error);
2166 if (UserSid !=
NULL)
2169 if (hProfileMutex !=
NULL)
2177 DPRINT(
"LoadUserProfileW() done\n");
2195 DPRINT(
"UnloadUserProfile() called\n");
2197 if (hProfile ==
NULL)
2199 DPRINT1(
"Invalid profile handle\n");
2207 DPRINT1(
"GetUserSidStringFromToken() failed\n");
2211 DPRINT(
"SidString: '%wZ'\n", &SidString);
2215 if (hProfileMutex ==
NULL)
2217 DPRINT1(
"Failed to create the profile mutex\n");
2231 DPRINT1(
"DecrementRefCount() failed (Error %lu)\n", dwError);
2236 if (dwRefCount == 0)
2238 DPRINT(
"RefCount is 0: Unload the Hive!\n");
2259 L"Volatile Environment");
2275 DPRINT1(
"RegUnLoadKeyW() failed (Error %lu)\n", dwError);
2281 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
2287 DPRINT1(
"RegOpenKeyExW() failed (Error %lu)\n", dwError);
2299 DPRINT1(
"RegOpenKeyExW() failed (Error %lu)\n", dwError);
2314 DPRINT1(
"RegQueryValueExW() failed (Error %lu)\n", dwError);
2324 DPRINT1(
"DeleteProfile(%S, NULL, NULL) failed (Error %lu)\n",
2334 if (hProfileKey !=
NULL)
2337 if (hProfilesKey !=
NULL)
2340 if (hProfileMutex !=
NULL)
2348 DPRINT(
"UnloadUserProfile() done\n");
#define RegCloseKey(hKey)
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegUnLoadKeyW(HKEY hKey, LPCWSTR lpSubKey)
LONG WINAPI RegFlushKey(HKEY hKey)
LONG WINAPI RegLoadKeyW(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpFile)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
BOOL WINAPI ConvertSidToStringSidW(PSID Sid, LPWSTR *StringSid)
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid)
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
DWORD WINAPI GetLengthSid(PSID pSid)
BOOL WINAPI OpenThreadToken(HANDLE ThreadHandle, DWORD DesiredAccess, BOOL OpenAsSelf, HANDLE *TokenHandle)
PVOID WINAPI FreeSid(PSID pSid)
BOOL WINAPI EqualSid(PSID pSid1, PSID pSid2)
#define ERROR_INVALID_PARAMETER
#define GetCurrentProcess()
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define WideCharToMultiByte
#define MultiByteToWideChar
static DWORD DWORD * dwLength
static void cleanup(void)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
BOOL CopyDirectory(LPCWSTR lpDestinationPath, LPCWSTR lpSourcePath)
BOOL RemoveDirectoryPath(LPCWSTR lpPathName)
BOOL CreateUserHive(LPCWSTR lpKeyName, LPCWSTR lpProfilePath)
SID_IDENTIFIER_AUTHORITY LocalSystemAuthority
BOOL GetUserSidStringFromToken(HANDLE hToken, PUNICODE_STRING SidString)
BOOL WINAPI CopySystemProfile(_In_ ULONG Unused)
BOOL WINAPI LoadUserProfileW(_In_ HANDLE hToken, _Inout_ LPPROFILEINFOW lpProfileInfo)
static DWORD DecrementRefCount(PWSTR pszSidString, PDWORD pdwRefCount)
BOOL WINAPI GetUserProfileDirectoryA(_In_ HANDLE hToken, _Out_opt_ LPSTR lpProfileDir, _Inout_ LPDWORD lpcchSize)
BOOL WINAPI DeleteProfileA(_In_ LPCSTR lpSidString, _In_opt_ LPCSTR lpProfilePath, _In_opt_ LPCSTR lpComputerName)
static HANDLE CreateProfileMutex(_In_ PWSTR pszSidString)
BOOL WINAPI CreateUserProfileA(_In_ PSID pSid, _In_ LPCSTR lpUserName)
static BOOL CheckForLoadedProfile(HANDLE hToken)
BOOL WINAPI GetAllUsersProfileDirectoryW(_Out_opt_ LPWSTR lpProfileDir, _Inout_ LPDWORD lpcchSize)
BOOL WINAPI CreateUserProfileExA(_In_ PSID pSid, _In_ LPCSTR lpUserName, _In_opt_ LPCSTR lpUserHive, _Out_opt_ LPSTR lpProfileDir, _In_ DWORD dwDirSize, _In_ BOOL bWin9xUpg)
static DWORD CheckForGuestsAndAdmins(_In_ HANDLE hToken, _Out_ PDWORD pdwState)
BOOL WINAPI GetDefaultUserProfileDirectoryW(_Out_opt_ LPWSTR lpProfileDir, _Inout_ LPDWORD lpcchSize)
BOOL WINAPI UnloadUserProfile(_In_ HANDLE hToken, _In_ HANDLE hProfile)
BOOL WINAPI DeleteProfileW(_In_ LPCWSTR lpSidString, _In_opt_ LPCWSTR lpProfilePath, _In_opt_ LPCWSTR lpComputerName)
BOOL WINAPI GetAllUsersProfileDirectoryA(_Out_opt_ LPSTR lpProfileDir, _Inout_ LPDWORD lpcchSize)
BOOL AppendSystemPostfix(LPWSTR lpName, DWORD dwMaxLength)
BOOL WINAPI GetProfileType(_Out_ PDWORD pdwFlags)
BOOL WINAPI CreateUserProfileW(_In_ PSID pSid, _In_ LPCWSTR lpUserName)
BOOL WINAPI CreateUserProfileExW(_In_ PSID pSid, _In_ LPCWSTR lpUserName, _In_opt_ LPCWSTR lpUserHive, _Out_opt_ LPWSTR lpProfileDir, _In_ DWORD dwDirSize, _In_ BOOL bWin9xUpg)
BOOL WINAPI LoadUserProfileA(_In_ HANDLE hToken, _Inout_ LPPROFILEINFOA lpProfileInfo)
BOOL WINAPI GetProfilesDirectoryA(_Out_ LPSTR lpProfileDir, _Inout_ LPDWORD lpcchSize)
BOOL WINAPI GetDefaultUserProfileDirectoryA(_Out_opt_ LPSTR lpProfileDir, _Inout_ LPDWORD lpcchSize)
static DWORD IncrementRefCount(PWSTR pszSidString, PDWORD pdwRefCount)
BOOL WINAPI GetUserProfileDirectoryW(_In_ HANDLE hToken, _Out_opt_ LPWSTR lpProfileDir, _Inout_ LPDWORD lpcchSize)
BOOL WINAPI GetProfilesDirectoryW(_Out_ LPWSTR lpProfilesDir, _Inout_ LPDWORD lpcchSize)
static DWORD SetProfileData(_In_ PWSTR pszSidString, _In_ DWORD dwFlags, _In_ HANDLE hToken)
static BOOL AcquireRemoveRestorePrivilege(IN BOOL bAcquire)
PSID WINAPI GetUserSid(HANDLE hToken)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define ERROR_ALREADY_EXISTS
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
NTSYSAPI ULONG NTAPI RtlLengthSid(IN PSID Sid)
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define REG_OPTION_NON_VOLATILE
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl _wcsupr(_Inout_z_ wchar_t *_String)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted)
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
LPVOID lpSecurityDescriptor
SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY]
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL, IN BOOL bInitialOwner, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseMutex(IN HANDLE hMutex)
#define INVALID_FILE_ATTRIBUTES
#define LookupPrivilegeValue
DWORD WINAPI GetLastError(void)
HANDLE WINAPI GetCurrentThread(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define ERROR_BUFFER_OVERFLOW
#define ERROR_SHARING_VIOLATION
#define ERROR_NOT_ALL_ASSIGNED
#define HKEY_LOCAL_MACHINE
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
#define DOMAIN_ALIAS_RID_GUESTS
struct _TOKEN_GROUPS * PTOKEN_GROUPS
#define SECURITY_BUILTIN_DOMAIN_RID
#define TOKEN_ADJUST_PRIVILEGES
struct _TOKEN_USER * PTOKEN_USER
#define SECURITY_DESCRIPTOR_REVISION
#define TOKEN_IMPERSONATE
#define SE_PRIVILEGE_ENABLED
#define DOMAIN_ALIAS_RID_ADMINS