ReactOS 0.4.17-dev-243-g1369312
environ.c File Reference
#include <k32.h>
#include <debug.h>
Include dependency graph for environ.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

DWORD WINAPI DECLSPEC_HOTPATCH GetEnvironmentVariableA (IN LPCSTR lpName, IN LPSTR lpBuffer, IN DWORD nSize)
 
DWORD WINAPI DECLSPEC_HOTPATCH GetEnvironmentVariableW (IN LPCWSTR lpName, IN LPWSTR lpBuffer, IN DWORD nSize)
 
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableA (IN LPCSTR lpName, IN LPCSTR lpValue)
 
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableW (IN LPCWSTR lpName, IN LPCWSTR lpValue)
 
LPSTR WINAPI GetEnvironmentStringsA (VOID)
 
LPWSTR WINAPI GetEnvironmentStringsW (VOID)
 
BOOL WINAPI FreeEnvironmentStringsA (IN LPSTR EnvironmentStrings)
 
BOOL WINAPI FreeEnvironmentStringsW (IN LPWSTR EnvironmentStrings)
 
DWORD WINAPI ExpandEnvironmentStringsA (IN LPCSTR lpSrc, IN LPSTR lpDst, IN DWORD nSize)
 
DWORD WINAPI ExpandEnvironmentStringsW (IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
 
BOOL WINAPI SetEnvironmentStringsA (IN LPCH NewEnvironment)
 
BOOL WINAPI SetEnvironmentStringsW (IN LPWCH NewEnvironment)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 17 of file environ.c.

Function Documentation

◆ ExpandEnvironmentStringsA()

DWORD WINAPI ExpandEnvironmentStringsA ( IN LPCSTR  lpSrc,
IN LPSTR  lpDst,
IN DWORD  nSize 
)

Definition at line 372 of file environ.c.

375{
376 ANSI_STRING Source, Dest;
377 UNICODE_STRING SourceU, DestU;
379 ULONG Result = 0, Length;
380 USHORT UniSize;
382
383 /* Check if the size is too big to fit */
384 UniSize = UNICODE_STRING_MAX_CHARS - 2;
385 if (nSize <= UniSize) UniSize = (USHORT)nSize;
386
387 /* Clear the input buffer */
388 if (lpDst) *lpDst = ANSI_NULL;
389
390 /* Initialize all the strings */
391 RtlInitAnsiString(&Source, lpSrc);
392 RtlInitUnicodeString(&SourceU, NULL);
393 RtlInitUnicodeString(&DestU, NULL);
395 if (!NT_SUCCESS(Status)) goto Quickie;
396
397 /* If the string fit in, make space for a NULL char */
398 if (UniSize)
399 {
400 UniSize--;
401 }
402 else
403 {
404 /* No input size, so no string size */
405 UniSize = 0;
406 }
407
408 /* Allocate the value string buffer */
409 Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, UniSize * sizeof(WCHAR));
410 if (!Buffer)
411 {
413 goto Quickie;
414 }
415
416 /* And initialize its string */
417 RtlInitEmptyUnicodeString(&DestU, Buffer, UniSize * sizeof(WCHAR));
418
419 /* Query the variable */
420 Length = 0;
421 Status = RtlExpandEnvironmentStrings_U(NULL, &SourceU, &DestU, &Length);
422
423 /* Check if we didn't have enough space */
425 {
426 /* Fixup the length that the API returned */
427 DestU.MaximumLength = (SHORT)Length;
428
429 /* Free old Unicode buffer */
430 RtlFreeHeap(RtlGetProcessHeap(), 0, DestU.Buffer);
431
432 /* Allocate new one */
433 Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, Length);
434 if (Buffer)
435 {
436 /* Query the variable so we can know its size */
437 DestU.Buffer = Buffer;
438 Status = RtlExpandEnvironmentStrings_U(NULL, &SourceU, &DestU, &Length);
439 if (NT_SUCCESS(Status))
440 {
441 /* Get the ASCII length of the variable, add a byte for NULL */
442 Result = RtlUnicodeStringToAnsiSize(&DestU) + sizeof(ANSI_NULL);
443 }
444 }
445 else
446 {
447 /* Set failure status */
449 DestU.Buffer = NULL;
450 }
451 }
452 else if (NT_SUCCESS(Status))
453 {
454 /* Check if the size is too big to fit */
455 UniSize = UNICODE_STRING_MAX_BYTES - 1;
456 if (nSize <= UniSize) UniSize = (USHORT)nSize;
457
458 /* Check the size */
460 if (Result <= UniSize)
461 {
462 /* Convert the string */
463 RtlInitEmptyAnsiString(&Dest, lpDst, UniSize);
464 Status = RtlUnicodeStringToAnsiString(&Dest, &DestU, FALSE);
465
466 /* Write a NULL-char in case of failure only */
467 if (!NT_SUCCESS(Status)) *lpDst = ANSI_NULL;
468 }
469 }
470Quickie:
471 /* Free the strings */
472 RtlFreeUnicodeString(&SourceU);
473 if (DestU.Buffer) RtlFreeHeap(RtlGetProcessHeap(), 0, DestU.Buffer);
474
475 /* Check if we succeeded */
476 if (!NT_SUCCESS(Status))
477 {
478 /* We did not, clear the result and set the error code */
480 Result = 0;
481 }
482
483 /* Return the result */
484 return Result;
485}
LONG NTSTATUS
Definition: precomp.h:26
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:616
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:634
Definition: bufpool.h:45
#define STATUS_NO_MEMORY
Definition: d3dkmdt.h:51
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
Status
Definition: gdiplustypes.h:24
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
#define UNICODE_STRING_MAX_CHARS
#define UNICODE_STRING_MAX_BYTES
#define ANSI_NULL
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
short WCHAR
Definition: pedump.c:58
short SHORT
Definition: pedump.c:59
unsigned short USHORT
Definition: pedump.c:61
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:167
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
USHORT MaximumLength
Definition: env_spec_w32.h:370
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:1834
NTSYSAPI NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PCWSTR, const UNICODE_STRING *, UNICODE_STRING *, ULONG *)
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
#define RtlUnicodeStringToAnsiSize(String)
Definition: rtlfuncs.h:1022

Referenced by create_test_entries(), DoEnvironmentSubstA(), HCR_RegGetIconA(), install_from_registered_dir(), RegGetValueA(), SHQueryValueExA(), test_appsearch_reglocator(), TEST_AssocQueryStringA(), test_DoEnvironmentSubst(), test_ExpandEnvironmentStringsA(), test_get_profiles_dir(), TEST_Start(), UnExpandEnvironmentStringForUserA(), and WsNpInitialize().

◆ ExpandEnvironmentStringsW()

DWORD WINAPI ExpandEnvironmentStringsW ( IN LPCWSTR  lpSrc,
IN LPWSTR  lpDst,
IN DWORD  nSize 
)

Definition at line 492 of file environ.c.

495{
498 USHORT UniSize;
499
500 UniSize = min(nSize, UNICODE_STRING_MAX_CHARS - 2);
501
503 RtlInitEmptyUnicodeString(&Destination, lpDst, UniSize * sizeof(WCHAR));
504
506 &Source,
508 &nSize);
510 {
511 return nSize / sizeof(WCHAR);
512 }
513
515 return 0;
516}
#define min(a, b)
Definition: monoChain.cc:55
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3051
uint16_t * LPWSTR
Definition: typedefs.h:56

Referenced by _SHExpandEnvironmentStrings(), _tryLoadProvider(), AddNewTopicEx(), AddNotificationDll(), AddSfcNotification(), AddUserProfile(), AppendSystemPostfix(), BackupIniFile(), BuildCommandLine(), Control_LoadApplet(), convert_reg_value(), CClassNode::ConvertResourceDescriptorToString(), CopySystemProfile(), CreateShortcut(), CreateTempDir(), CreateUserProfileExW(), CryptAcquireContextW(), DeleteProfileW(), DoEnvironmentSubstW(), DoLoadIcons(), CShellLink::DoOpen(), DoWriteSoundEvents(), EditTypeDlg_OnChangeIcon(), EditTypeDlg_OnInitDialog(), EditTypeDlg_UpdateEntryIcon(), EnableVisualTheme(), CACListISF::Expand(), expand_environment(), ExpandEnvironmentStringsA(), ExpandEnvStrings(), FileQueryFiles(), get_library_for_classid(), get_object_dll_path(), GetAllUsersProfileDirectoryW(), CInstalledApplicationInfo::GetApplicationRegString(), GetDefaultUserProfileDirectoryW(), GetDesktopPath(), CQueryAssociations::GetExecutable(), GetExpandedFilePathName(), GetFileTypeIconsEx(), getIconLocationForDrive(), getIconLocationForFolder(), GetLayoutName(), GetProfilesDirectoryW(), GetProgramsPath(), GetServiceMainFunctions(), GetUserProfileDirectoryW(), RunOnceExSection::HandleValue(), HCR_RegGetIconW(), ICO_ExtractIconExW(), ImportSoundLabel(), init_envvars_map(), init_filedlg_infoW(), CLayerUIPropPage::InitFile(), InitializeProfiles(), InitializeProgramFilesDir(), CFileDefExt::InitOpensWithField(), LaunchProcess(), load_mapi_provider(), load_provider(), LoadIniFile(), LoadLogFile(), MyFileExists(), CNewMenu::NewItemByCommand(), OpenHostsFile(), PathEnvSubstIsDirectory(), PickIconDlg(), PlaySound_ExpandEnvironmentStrings(), ProcessRunKeys(), ProcessUnattendSection(), query_reg_path(), RegGetValueW(), CControlPanelEnum::RegisterRegistryCPanelApps(), RegLoadMUIStringW(), resolve_filename(), RunCommand(), RunDlgProc(), RunSetupThreadProc(), ScmConvertToBootPathName(), ScmReadString(), search_reg(), SetUserWallpaper(), SHGetShellStyleHInstance(), SHLoadIndirectString(), SHPropertyBag_OnIniFile(), SHPropertyBag_SHSetIniStringW(), SHQueryValueExW(), SockLoadHelperDll(), start_debugger(), START_TEST(), StartProcess(), TEST_AssocQueryStringW(), test_checklinkpath(), test_DoEnvironmentSubst(), test_ExpandEnvironmentStringsA(), test_ExpandEnvironmentStringsW(), test_iconlocation(), Test_ProtectedFiles(), TEST_Start(), TRASH_PlayEmptyRecycleBinSound(), UnExpandEnvironmentStringForUserW(), variant_from_registry_value(), WelcomeDlgProc(), WlxActivateUserShell(), WriteIniFile(), and WshShell3_ExpandEnvironmentStrings().

◆ FreeEnvironmentStringsA()

BOOL WINAPI FreeEnvironmentStringsA ( IN LPSTR  EnvironmentStrings)

Definition at line 352 of file environ.c.

353{
354 return RtlFreeHeap(RtlGetProcessHeap(), 0, EnvironmentStrings);
355}

Referenced by doChild(), env_init(), and test_Environment().

◆ FreeEnvironmentStringsW()

◆ GetEnvironmentStringsA()

LPSTR WINAPI GetEnvironmentStringsA ( VOID  )

Definition at line 266 of file environ.c.

267{
271 PCHAR Buffer = NULL;
272
274 p = Environment = NtCurrentPeb()->ProcessParameters->Environment;
275
276 do
277 {
278 p += wcslen(p) + 1;
279 } while (*p);
280
281 Length = p - Environment + 1;
282
284 if (NT_SUCCESS(Status))
285 {
286 Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, Size);
287 if (Buffer)
288 {
290 if (!NT_SUCCESS(Status))
291 {
292 RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer);
293 Buffer = NULL;
294
296 }
297 }
298 else
299 {
301 }
302 }
303 else
304 {
306 }
307
309 return Buffer;
310}
#define NtCurrentPeb()
Definition: FLS.c:22
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
GLfloat GLfloat p
Definition: glext.h:8902
PVOID PVOID PWCHAR PVOID Environment
Definition: env.c:47
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToOemN(_Out_ PCHAR OemString, _In_ ULONG OemSize, _Out_opt_ PULONG ResultSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
Definition: nlsboot.c:264
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteSize(_Out_ PULONG MbSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
Definition: nlsboot.c:146
uint16_t * PWCHAR
Definition: typedefs.h:56
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
NTSYSAPI void WINAPI RtlReleasePebLock(void)
Definition: libsupp.c:84
NTSYSAPI void WINAPI RtlAcquirePebLock(void)
Definition: libsupp.c:74

◆ GetEnvironmentStringsW()

LPWSTR WINAPI GetEnvironmentStringsW ( VOID  )

Definition at line 317 of file environ.c.

318{
321
323
324 p = Environment = NtCurrentPeb()->ProcessParameters->Environment;
325
326 do
327 {
328 p += wcslen(p) + 1;
329 } while (*p);
330
331 Length = p - Environment + 1;
332
333 p = RtlAllocateHeap(RtlGetProcessHeap(), 0, Length * sizeof(WCHAR));
334 if (p)
335 {
337 }
338 else
339 {
341 }
342
344 return p;
345}
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263

◆ GetEnvironmentVariableA()

DWORD WINAPI DECLSPEC_HOTPATCH GetEnvironmentVariableA ( IN LPCSTR  lpName,
IN LPSTR  lpBuffer,
IN DWORD  nSize 
)

Definition at line 28 of file environ.c.

31{
32 ANSI_STRING VarName, VarValue;
33 UNICODE_STRING VarNameU, VarValueU;
35 ULONG Result = 0;
36 USHORT UniSize;
38
39 /* Initialize all the strings */
40 RtlInitAnsiString(&VarName, lpName);
41 RtlInitUnicodeString(&VarNameU, NULL);
42 RtlInitUnicodeString(&VarValueU, NULL);
43 Status = RtlAnsiStringToUnicodeString(&VarNameU, &VarName, TRUE);
44 if (!NT_SUCCESS(Status)) goto Quickie;
45
46 /* Set maximum size for unicode string (in chars, including ANSI_NULL) */
48
49 /* Allocate the value string buffer */
50 Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, UniSize * sizeof(WCHAR));
51 if (!Buffer)
52 {
54 goto Quickie;
55 }
56
57 /* And initialize its string */
58 RtlInitEmptyUnicodeString(&VarValueU, Buffer, UniSize * sizeof(WCHAR));
59
60 /* Acquire the PEB lock since we'll be querying variables now */
62
63 /* Query the variable */
64 Status = RtlQueryEnvironmentVariable_U(NULL, &VarNameU, &VarValueU);
65 if ((NT_SUCCESS(Status)) && !(nSize))
67
68 /* Check if we didn't have enough space */
70 {
71 /* Fixup the length that the API returned */
72 VarValueU.MaximumLength = VarValueU.Length + sizeof(UNICODE_NULL);
73
74 /* Free old Unicode buffer */
75 RtlFreeHeap(RtlGetProcessHeap(), 0, VarValueU.Buffer);
76
77 /* Allocate new one */
78 Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, VarValueU.MaximumLength);
79 if (Buffer)
80 {
81 /* Query the variable so we can know its size */
82 VarValueU.Buffer = Buffer;
83 Status = RtlQueryEnvironmentVariable_U(NULL, &VarNameU, &VarValueU);
84 if (NT_SUCCESS(Status))
85 {
86 /* Get the ASCII length of the variable */
88 }
89 }
90 else
91 {
92 /* Set failure status */
94 VarValueU.Buffer = NULL;
95 }
96 }
97 else if (NT_SUCCESS(Status))
98 {
99 /* Check the size */
101 if (Result <= UniSize)
102 {
103 /* Convert the string */
104 RtlInitEmptyAnsiString(&VarValue, lpBuffer, UniSize);
105 Status = RtlUnicodeStringToAnsiString(&VarValue, &VarValueU, FALSE);
106 if (NT_SUCCESS(Status))
107 {
108 /* NULL-terminate and set the final length */
109 ASSERT(VarValue.Length < UniSize);
110 lpBuffer[VarValue.Length] = ANSI_NULL;
111 Result = VarValue.Length;
112 }
113 }
114 }
115
116 /* Release the lock */
118
119Quickie:
120 /* Free the strings */
121 RtlFreeUnicodeString(&VarNameU);
122 if (VarValueU.Buffer)
123 RtlFreeHeap(RtlGetProcessHeap(), 0, VarValueU.Buffer);
124
125 /* Check if we succeeded */
126 if (!NT_SUCCESS(Status))
127 {
128 /* We did not, clear the result and set the error code */
130 Result = 0;
131 }
132
133 /* Return the result */
134 return Result;
135}
#define ASSERT(a)
Definition: mode.c:44
NTSYSAPI NTSTATUS NTAPI RtlQueryEnvironmentVariable_U(_In_opt_ PWSTR Environment, _In_ PCUNICODE_STRING Name, _Out_ PUNICODE_STRING Value)
Definition: env.c:659
_Out_ LPWSTR lpBuffer
Definition: netsh.h:68
#define UNICODE_NULL
_In_ LPCSTR lpName
Definition: winbase.h:2543

◆ GetEnvironmentVariableW()

DWORD WINAPI DECLSPEC_HOTPATCH GetEnvironmentVariableW ( IN LPCWSTR  lpName,
IN LPWSTR  lpBuffer,
IN DWORD  nSize 
)

Definition at line 143 of file environ.c.

146{
147 UNICODE_STRING VarName, VarValue;
149 USHORT UniSize;
150
151 if (lpBuffer == NULL)
152 {
153 nSize = 0;
154 }
155
156 /* Set maximum size for unicode string (in chars, including UNICODE_NULL) */
158
160 if (!NT_SUCCESS(Status))
161 {
163 return 0;
164 }
165
166 RtlInitEmptyUnicodeString(&VarValue, lpBuffer, UniSize * sizeof(WCHAR));
167
168 Status = RtlQueryEnvironmentVariable_U(NULL, &VarName, &VarValue);
169 if (!NT_SUCCESS(Status))
170 {
172 {
173 return (VarValue.Length / sizeof(WCHAR)) + sizeof(ANSI_NULL);
174 }
176 return 0;
177 }
178
179 if (lpBuffer)
180 lpBuffer[VarValue.Length / sizeof(WCHAR)] = UNICODE_NULL;
181
182 return (VarValue.Length / sizeof(WCHAR));
183}
NTSYSAPI NTSTATUS WINAPI RtlInitUnicodeStringEx(PUNICODE_STRING, PCWSTR)

◆ SetEnvironmentStringsA()

BOOL WINAPI SetEnvironmentStringsA ( IN LPCH  NewEnvironment)

Definition at line 523 of file environ.c.

524{
525 STUB;
526 return FALSE;
527}
#define STUB
Definition: kernel32.h:27

◆ SetEnvironmentStringsW()

BOOL WINAPI SetEnvironmentStringsW ( IN LPWCH  NewEnvironment)

Definition at line 534 of file environ.c.

535{
536 STUB;
537 return FALSE;
538}

◆ SetEnvironmentVariableA()

BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableA ( IN LPCSTR  lpName,
IN LPCSTR  lpValue 
)

Definition at line 191 of file environ.c.

193{
194 ANSI_STRING VarName, VarValue;
195 UNICODE_STRING VarNameU, VarValueU;
197
198 RtlInitAnsiString(&VarName, (LPSTR)lpName);
199 Status = RtlAnsiStringToUnicodeString(&VarNameU, &VarName, TRUE);
200 if (NT_SUCCESS(Status))
201 {
202 if (lpValue)
203 {
204 RtlInitAnsiString(&VarValue, (LPSTR)lpValue);
205 Status = RtlAnsiStringToUnicodeString(&VarValueU, &VarValue, TRUE);
206 if (NT_SUCCESS(Status))
207 {
208 Status = RtlSetEnvironmentVariable(NULL, &VarNameU, &VarValueU);
209 RtlFreeUnicodeString(&VarValueU);
210 }
211 }
212 else
213 {
215 }
216
217 RtlFreeUnicodeString(&VarNameU);
218
219 if (NT_SUCCESS(Status)) return TRUE;
220 }
221
223 return FALSE;
224}
NTSYSAPI NTSTATUS NTAPI RtlSetEnvironmentVariable(_In_z_ PWSTR *Environment, _In_ PUNICODE_STRING Name, _In_ PUNICODE_STRING Value)
Definition: env.c:338
char * LPSTR
Definition: typedefs.h:51

Referenced by create_environ(), create_test_entries(), init_test(), process1(), silence_debug_output(), START_TEST(), Test_ApphelpCheckRunApp(), test_create_env(), test_environment_manipulation(), test_ExpandEnvironmentStringsA(), test_FileTimeToLocalFileTime(), test_fileurls(), test_formatrecord(), test_formatrecord2(), test_formatrecord_tables(), Test_GetMatchingExe(), test_GetSetEnvironmentVariableA(), test_GetSetEnvironmentVariableAW(), test_GetTempPath(), test_GetTimeZoneInformation(), test_GetVolumeInformationA(), test_Installer_RegistryValue(), test_LdrGetDllPath(), test_LoadImage_working_directory(), test_mode_generic(), test_NeedCurrentDirectoryForExePathA(), test_NeedCurrentDirectoryForExePathW(), test_PathUnExpandEnvStrings(), test_RegLoadMUIString(), Test_repeatlayer(), test_RtlGetExePath(), test_RtlGetSearchPath(), test_RtlSetCurrentEnvironment(), test_search_path(), test_SetEnvironmentStrings(), and test_urls().

◆ SetEnvironmentVariableW()

BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableW ( IN LPCWSTR  lpName,
IN LPCWSTR  lpValue 
)