|
ExpandEnvironmentStrings Method |
|
Description
Returns an environment variable's expanded value.
PowerBASIC Syntax
Arguments
Return Value
BSTR. The environment variable's expanded value.
Remarks
The ExpandEnvironmentStrings method expands environment variables defined in the PROCESS environment space only. Environment variable names, which must be enclosed between "%" characters, are not case-sensitive.
Example [PowerBASIC]
#INCLUDE "WSHOM.INC"
' Creates an instance of the Windows Script Host DIM pWsh AS IWshShell pWsh = NEWCOM "WScript.Shell"
' The following code expands the Windows Directory ' environment variable and displays it: DIM outStr AS STRING outStr = pWsh.ExpandEnvironmentStrings(UCODE$("%WinDir%")) STDOUT ACODE$(outStr)
|
