As the doc says, it is just an array of null-terminated Unicode strings, with all Environment Variables
(Environment Tab in Process Explorer for example)
What Exactly is an Environment Block?
Hi.
On Changing Environment Variables it is said that environment block is a null-terminated block of null-terminated strings.
What is meant by "block"? Also what the "environment" term reffers to?
Windows development Windows API - Win32
Windows for business Windows Client for IT Pros User experience Other
Developer technologies C++
2 answers
Sort by: Most helpful
-
Castorix31 90,681 Reputation points
2022-07-11T12:55:21.967+00:00 -
Limitless Technology 39,916 Reputation points
2022-07-13T14:20:43.38+00:00 Hi there,
An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer. They are part of the environment in which a process runs.
Each environment string, being a string, is NULL-terminated, and the entire block of strings is itself NULL-terminated. PATH is one example of a commonly used environment variable.
To pass the parent's environment to a child process, set lpEnvironment to NULL in the CreateProcess call. Any process, in turn, can interrogate or modify its environment variables or add new environment variables to the block.
---------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept it as an answer–