Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
is there a way to read windows environment variables?
I think I should know this but I am drawing a blank. Thanks.
Comments
I see that in the DLL_Kernel32, but it doesn't appear in the OI documentation. Am I missing it there?
Thanks.
mybuffer=STR(char(0),4096) result = GetEnvironmentVariable(Variable:char(0),mybuffer,4096) return mybuffer[1,result]
I just tried this, but am seeing null as the result. I ran this command in a dos window in my OI app directory:
set uploads=C:\Temp
Then added this code to my OI program:
mybuffer = STR(char(0),4096)
result = GetEnvironmentVariable('uploads':char(0),mybuffer,4096)
uplPath = mybuffer[1,result]
Am I doing something wrong? Thanks.