CSIDL Support

Top  Previous  Next

CSIDL (constant special item ID list) values provide a unique system-independent way to identify special folders that you use frequently by applications, but which may not have the same name or location on any given system. For example, the system folder may be "C:\Windows" on one system and "C:\Winnt" on another.

The Clarion and ABC template chains now include support for CSIDL folders for both INI and your application’s data files.

The support for storing your INI file to CSIDL locations is found in the Global Properties > Actions > General dialog.

The support for redirecting your data files to a designated CSIDL location is found in the Global Properties > Actions > File Control dialog.

The templates allow you to store the INI and data files in a common CSIDL location, or if you prefer you can store your INI files in one CSIDL location and your data files in another.

Here are the default CSIDL locations that are currently supported in the ABC template chain:

CSIDL_PERSONAL

The virtual folder that represents the My Documents desktop item. This is also equivalent to CSIDL_MYDOCUMENTS.

Examples:

XP

C:\Documents and Settings\User Name\My Documents

Vista

C:\Users\User Name\Documents

Windows 7

C:\Users\User Name\Documents

 

CSIDL_COMMON_DOCUMENTS

The file system directory that contains documents that are common to all users. A typical path is C:\Documents and Settings\All Users\Documents.

Examples:

XP

C:\Documents and Settings\All Users\Documents

Vista

C:\Users\Public\Documents

Windows 7

C:\Users\Public\Documents

 

CSIDL_APPDATA

The file system directory that serves as a common repository for application-specific data. A typical path is C:\Documents and Settings\username\Application Data.

Examples:

XP

C:\Documents and Settings\User Name\Application Data

Vista

C:\Users\User Name\AppData\Roaming

Windows 7

C:\Users\User Name\AppData\Roaming

 

CSIDL_LOCAL_APPDATA

The file system directory that serves as a data repository for local (non-roaming) applications. A typical path is C:\Documents and Settings\username\Local Settings\Application Data.

Examples:

XP

C:\Documents and Settings\User Name\Local Settings\Application Data

Vista

C:\Users\User Name\AppData\Local

Windows 7

C:\Users\User Name\AppData\Local

 

CSIDL_COMMON_APPDATA

The file system directory that contains application data for all users. A typical path is C:\Documents and Settings\All Users\Application Data. This folder is used for application data that is not user specific. For example, an application can store a spell-check dictionary, a database of clip art, or a log file in the CSIDL_COMMON_APPDATA folder. This information will not roam and is available to anyone using the computer.

Examples:

XP

C:\Documents and Settings\All Users\Application Data

Vista

C:\ProgramData

Windows 7

C:\ProgramData

 

In addition to setting the following root folders, you can optionally set up subfolders by your company and then by your product, For example, using the CSIDL_PERSONAL option:

Company Folder: SoftVelocity

Product Folder: Invoice

Result:

XP

C:\Documents and Settings\User Name\My Documents\SoftVelocity\Invoice

Vista

C:\Users\User Name\Documents\SoftVelocity\Invoice

Windows 7

C:\Users\User Name\Documents\SoftVelocity\Invoice

 

If the Company Name subfolder is blank, the Product Name subfolder is attached to the CSIDL location.