I am using SHGetSpecialFolderPath
to retrieve some Windows special folders with Delphi 7. Here is some code sample:
const
CSIDL_DESKTOP = $0000;
CSIDL_PERSONAL = $0005;
CSIDL_MYPICTURES = $0027;
CSIDL_MYMUSIC = $000d;
CSIDL_MYVIDEO = $000e;
CSIDL_WINDOWS = $0024;
CSIDL_SYSTEM = $0025;
function GetSpecialFolderPath(Folder: Integer; ForceDir: Boolean): string;
// Uses ShlObj
var
Path: array [0..255] of char;
begin
SHGetSpecialFolderPath(0, @Path[0], Folder, ForceDir);
Result := Path;
end;
edtFolder.Text := GetSpecialFolderPath(CSIDL_DESKTOP, False);
How can I get the "Downloads" folder with this approach?