[Overview][Constants][Procedures and functions][Index] Reference for unit 'WinDirs' (#rtl)

GetWindowsSpecialDir

Get the location of a special directory.

Declaration

Source position: windirs.pp line 223

function GetWindowsSpecialDir(

  ID: Integer;

  CreateIfNotExists: Boolean = True

):string;

function GetWindowsSpecialDir(

  const GUID: TGUID;

  CreateIfNotExists: Boolean = True

):string;

Arguments

ID

  

Identifier of the folder location to retrieve.

Function result

Full path of the folder identified by ID.

Description

GetWindowsSpecialDir can be used to to get the path of special folders on the Windows system. The locations are identified using one of the CSIDL_* constants. If the ID of a location is or-ed with the CSIDL_FLAG_CREATE constant, then the directory will be created if it didn't exist yet (and the user has sufficient rights to do so).

Errors

On error, an empty string is returned.


Documentation generated on: Jun 22 2020