Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 1022 Bytes

TPJEnvVars-GetEnumerator.md

File metadata and controls

27 lines (15 loc) · 1022 Bytes

GetEnumerator method

Project: Environment Variables Unit

Unit: PJEnvVars

Class: TPJEnvVars

Applies to: ~>3.0

function GetEnumerator: TPJEnvVarsEnumerator;

⚠️ TPJEnvVars has been deprecated. Use TPJEnvVarsEnumerator instances directly or use TPJEnvironmentVars.EnumNames static method instead.

Description

Creates and returns a new enumerator of all environment variable names in the current process.

Returns:

  • A new TPJEnvVarsEnumerator instance. When the method is called manually the user is responsible for freeing the instance.

When compiled with Delphi 2005 and this method enables a TPJEnvVars component instance to be used in a for..in loop.

Important: Environment variables should not be modified while the enumerator is executing (e.g. in a for..in loop).