zu 2) Ich habe mir mal das gebastelt.
Delphi-Quellcode:
function myfiles:string;
var
baum:pitemidlist;
pfad:array[0..max_path+1]of char;
begin
try
shgetspecialfolderlocation(getactivewindow,csidl_personal,baum);
shgetpathfromidlist(baum,pfad);
finally
result:=pfad;
end;
end;
Bei mir funktioniert es. Aber geht es in allen Windows-Versionen?