Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How can I get all the environment variables from Windows?
Answer: Try this code:
Example:
#if targetWin32
declare function GetEnvironmentStrings Lib "kernel32" () as ptr
dim m as memoryBlock
dim n as Integer

m=GetEnvironmentStrings()

n=0
do
msgBox m.cstring(n)
while m.byte(n)<>0
n=n+1
wend
n=n+1
loop until m.byte(n)=0
#endif
Notes: The MBS Plugin has an EnvironmentMBS class for this.

Feedback, Comments & Corrections




Links
MBS Xojo blog