RtlSetEnvironmentStrings - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H

/**
 * The RtlSetEnvironmentStrings routine replaces the environment block of the current process with the
 * specified environment strings.
 *
 * \param NewEnvironment A pointer to the new environment block, consisting of null-terminated name=value
 * strings terminated by an additional null character.
 * \param NewEnvironmentSize The size, in bytes, of the new environment block.
 * \return NTSTATUS Successful or errant status.
 * \remarks Mutates process-wide environment state and can invalidate other threads borrowed pointers.
 * SetCurrentEnvironment can return the old allocation or release it when no old-output slot is supplied. This
 * operation transfers ownership of process-wide environment storage.
 */
NTSYSAPI
NTSTATUS
NTAPI
RtlSetEnvironmentStrings(
    _In_ PCWSTR NewEnvironment,
    _In_ SIZE_T NewEnvironmentSize
    );

#endif

View code on GitHub

NtDoc

No description available.