Public Function EnvironToVariantVector( _ ByRef rEnviron() As Variant _ ) As Boolean
Assuming Dim avarEnv() As Variant for example EnvironToVariantVector(avarEnv()) = True might leave LBound(avarEnv) = 0 UBound(avarEnv) = 5 avarEnv(1) = "COMSPEC=C:\COMMAND.COM" avarEnv(2) = "PROMPT=$p$g" avarEnv(3) = "TEMP=C:\TEMP" avarEnv(4) = "TZ=PST8PDT" avarEnv(5) = "PATH=D:\WIN;D:\WIN\COMMAND;C:\DOS"See also:
EnvironToVariantVectorSample Subroutine GetDOSPath Function WindowsAPI Class VariantVectorToString Function Environ Function (Visual Basic)rEnviron: Dynamic array of Variants into which the DOS Environment settings will be copied. The array will be re-dimensionsed as a one-dimensional array with a lower-bound of 0 (zero). The upper bound will be the number of DOS Environment settings in the array. The 0 (zero) element of the array will remain Empty and unused, so that the array can be re-dimensioned with both lower and upper bounds of 0 in case there are no DOS Environment settings. (The settings will be copied into elements 1..N of the array, but it will be dimensioned from 0..N.)
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.