Good morning community
I need to set an environment variable and read it later.
I found: www://https://codeverge.com/sybase.powerbuilder.general/creating-setting-environment-vari/954332
I try to set it:
FUNCTION boolean SetEnvironmentVariableA (string szName, string szValue) LIBRARY "kernel32.dll" boolean lb_ret
lb_ret = SetEnvironmentVariableA ("Key", "Value")
If I try to read it:
ContextKeyword lcxk_base
string ls_Path
string ls_values []
GetContextService ("Keyword", lcxk_base)
GetContextService ("ContextKeyword", lcxk_base)
lcxk_base.GetContextKeywords ("Keyword", ls_values)
IF Upperbound (ls_values)> 0 THEN
ls_Path = ls_values [1]
ELSE
ls_Path = "* UNDEFINED *"
END IF
The result is always "* UNDEFINED *"
Any suggestions ?
Thanks in advance for the help.