27 WCHAR szEnvValue[1024];
33 HKEY hKeyShellFolders;
39 L"Volatile Environment",
49 WARN(
"WL: RegCreateKeyExW() failed to create the volatile environment key (Error: %ld)\n", lError);
55 Session->Profile->pszEnvironment !=
NULL)
57 wstr = Session->Profile->pszEnvironment;
96 L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
131 HKEY hKeyCurrentUser;
134 TRACE(
"WL: CreateUserEnvironment called\n");
139 ERR(
"ImpersonateLoggedOnUser() failed with error %lu\n",
GetLastError());
156 TRACE(
"WL: CreateUserEnvironment done\n");
BOOL CreateUserEnvironment(IN PWLSESSION Session)
static VOID BuildVolatileEnvironment(IN PWLSESSION Session, IN HKEY hKeyCurrentUser)
#define RegCloseKey(hKey)
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 RegOpenCurrentUser(IN REGSAM samDesired, OUT PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
BOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken)
GLuint GLsizei GLsizei * length
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define KEY_CREATE_SUB_KEY
#define REG_OPTION_VOLATILE
_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 wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
DWORD WINAPI GetLastError(void)
BOOL WINAPI RevertToSelf(void)
#define WLX_PROFILE_TYPE_V2_0