ImageEn, unit iexWindowsFunctions

GetWindowsSpecialFolder


Declaration

function GetWindowsSpecialFolder(const CSIDL: Integer): string;


Description

Calls SHGetSpecialFolderPath to return a Windows special folder.

Common values:
Value Description
CSIDL_DESKTOP Windows Desktop
CSIDL_LOCAL_APPDATA Local App Data folder
CSIDL_MYDOCUMENTS (or CSIDL_PERSONAL) User's Documents folder
CSIDL_MYMUSIC User's Music folder
CSIDL_MYPICTURES User's Pictures folder
CSIDL_MYVIDEO User's Videos folder
CSIDL_PROGRAM_FILES Program Files folder
CSIDL_WINDOWS Windows folder


Example

// Display the contents of the Recycle Bin
IEFolderMView1.Folder := GetWindowsSpecialFolder( CSIDL_BITBUCKET );

// Set the TImageEnMView folder to the users's videos folder
IEFolderMView1.Folder := GetWindowsSpecialFolder( CSIDL_MYVIDEO )

// Return the Windows Fonts folder
fontPath := GetWindowsSpecialFolder(CSIDL_FONTS)