I can't find a more complete online, I'm doing it yourself.
Unit utils;
Interface
Uses Windows, Sysutils, Shlobj;
type TSpecialFolder = (sfDesktop, //
/ Local Settings / Applicaiton Data (non roaming) sfALTStartup, // non localized startup sfCommonALTStartup, // non localized common startup sfCommonFavorites, // All Users / Favorites sfInternetCache, //
/ Start Menu / Programs / Administrative Tools sfConnections, // Network and Dial-up Connections sfCommonMusic, // All Users / My Music sfCommonPictures, // All Users / My Pictures sfCommonVideo, // All Users / My Video sfResources, // Resource Direcotry sfResourcesLocalized, // Localized Resource Direcotry sfCommonOEMLinks, // Links to All Users OEM specific apps sfCDBurnArea, // USERPROFILE / Local Settings / Application Data / Microsoft / CD Burning sfComputersNearMe // Computers Near Me (computered from Workgroup membership)); function GetSpecialFolder (SpecialFolder: TspecialFolder): String;
IMPLEMentation
Function GetSpecialFolder (SpecialFolder: TspecialFolder): String;
const SpecialFolderValues: array [TSpecialFolder] of Integer = ($ 0000, $ 0001, $ 0002, $ 0003, $ 0004, $ 0005, $ 0006, $ 0007, $ 0008, $ 0009, $ 000a, $ 000b, $ 000c, $ 000d, $ 000e, $ 0010, $ 0011, $ 0012, $ 0013, $ 0014, $ 0015, $ 0016, $ 0017, $ 0018, $ 0019, $ 001a, $ 001b, $ 001c, $ 001d, $ 001e, $ 001f, $ 0020, $ 0021, $ 0022, $ 0023, $ 0024, $ 0025, $ 0026, $ 0027, $ 0028, $ 0037, $ 0033, $ 0033, $ 0033, $ 0033D)
var ItemIDList: PItemIDList; Buffer: array [0..MAX_PATH] of Char; begin SHGetSpecialFolderLocation (0, SpecialFolderValues [SpecialFolder], ItemIDList); SHGetPathFromIDList (ItemIDList, Buffer); Result: = StrPas (Buffer); end;
End.