Environment variables

BlitzMax Forums/BlitzMax Programming/Environment variables

ziggy(Posted 2005) [#1]
Is there any way, using the API of Windows, to read the value of any environment variable from within BLIde?
I've tryed this:

Import "-lshell32"
Extern "win32"
	Function GetEnvironmentVariable Variable:String,Result:String,BufSize:Long) = "GetEnvironmentVariable@16"
end extern


but it doesn't compile...


marksibly(Posted 2005) [#2]
Try:

putenv_ "Myvar=hello"
Print getenv_("Myvar")



ziggy(Posted 2005) [#3]
Thanks!