Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

TPJEnvironmentVars class

Project: Environment Variables Unit

Unit: PJEnvVars

Applies to: ~>3.0

Description

This is a static class that provides methods for interogating, manipulating and modifying the environment variables available to the current process.

Warning: This class must never be constructed: all its methods are class methods. No standard methods, properties or events are defined. Attempting to construct it will raise an ENoConstructException exception.

Class Methods

Method Description
BlockSize Returns the size of the current environment block.
Count Returns the number of available environment variables.
Create This constructor must never be called. If it is called it will raise an ENoConstructException exception.
CreateBlock Creates a new custom environment block.
Delete Deletes an environment variable.
EnumNames Enumerates the names of all available environment variables.
EnumVars Enumerates all available environment variables.
Exists Checks if a given environment variable exists.
Expand Expands a string containing environment variables by replacing each environment variable name with its value.
GetAll Overloaded methods that get a list of all available environment variables.
GetAllNames Overloaded methods that get a list of the names of all available environment variables.
GetValue Returns the value of an environment variable.
SetValue Sets the value of an environment variable.