procedure TMainFrm.AddVarsToMemo(Sender: TObject);
var
p: pChar;
begin
Memo1.Lines.Clear;
Memo1.WordWrap := false;
p := GetEnvironmentStrings;
while p^ <> #0 do
begin
Memo1.Lines.Add(StrPas(p));
inc(p, lStrLen(p) + 1);
end;
FreeEnvironmentStrings(p);
end;
|