This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.
Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.
Project: Shell Folders Unit.
Unit: PJShellFolders.
Applies to: ~>2.0
The following public routines are defined in PJShellFolders:
function IsValidSpecialFolderId(ID: Integer): Boolean;
Returns true if the given special folder identifier is defined by Windows and supported by this unit.
This test can be performed to check an identifier value before passing to SpecialFolderIdToStr or before setting the TPJSpecialFolderInfo component’s FolderID property to avoid exception being raised by an invalid value.
Use the TPJSpecialFolderEnum class to enumerate all the valid folder identifiers.
function NumSpecialFolderIds: Integer;
Returns the number of special folder identifiers defined by Windows that are supported by this unit.
function SpecialFolderIdToStr(ID: Integer): string;
Returns the string representation of the constant identifier used by Windows to identify a special folder.
Windows defines identifiers to represent the shell’s special folders. The ShlObj unit defines symbolic constants for these values. Passing an indentifier value to this function causes the name of the associated symbolic constant to be returned as a string. If the value is not a valid special folder indentifier the an exception is raised.
To check if an identifier value is valid use the IsValidSpecialFolderId function.
Use the TPJSpecialFolderEnum class to enumerate all the valid folder identifiers.
SpecialFolderIdToStr(4)
returns 'CSIDL_PRINTERS'
.
function StrToSpecialFolderID(const IDStr: string): Integer;
Returns the value of the special folder identifier associated with the Windows symbolic constant.
Windows defines identifiers to represent the shell’s special folders. The ShlObj unit defines symbolic constants for these values. Passing the string representation of one of these constants to this function returns the constant’s value. Passing an invalid constant name causes an exception to be raised.
StrToSpecialFolderId('CSIDL_PRINTERS')
returns 4
.
function PIDLToFolderPath(PIDL: PItemIDList): string;
Returns the path of the folder described by PIDL.
function PIDLToFolderDisplayName(PIDL: PItemIDList): string;
Returns the display name of the folder described by PIDL.