[REBOL] Re: Getting username under windows
From: gregg:irwin:gmai:l at: 19-Mar-2007 15:56
tdn> Yes this wil work! I try to understand it. Never heard of integer-struct.
It's just a struct with one int element in it.
tdn> What does this mean:
tdn> lpLength [struct! [(first integer-struct)]]
Using structs with routines is a bit of a pain. What this does is
define a struct as the param for the routine, and you need to provide
the struct spec when you do that, which is what FIRST does.
>> integer-struct: make struct! [val [integer!]] none
>> first integer-struct
== [val [integer!]]
GET-ENV is much easier though. For some reason I thought that wasn't
in all releases anymore, like the *-REG funcs.