reference:plugins:plugin_sdk:configuration_functions:getconfigpath

GetConfigPath(
     int:iPathType,
     LPTSTR:pszBuf,
     int:cchMax
)
→ BOOL

Arguments

iPathType

[in] The type of path to retrieve. Valid values are:

OPUSPATH_CONFIGFolder where plugin configuration data is stored
OPUSPATH_STATEDATAFolder where plugin state date is stored

pszBuf

[out] Buffer to receive the folder path

cchMax

[in] Size of the supplied buffer, in characters

Return value

Returns TRUE if the path was successfully retrieved, or FALSE on failure.

Description

The GetConfigPath function lets you retrieve the path used for storage of plugin configuration data (user-configured, will be backed-up and exported to USB) and state data (non-user configured, eg window positions, not necessarily backed-up or exported.)

Example paths returned by this function on Windows Vista:

OPUSPATH_CONFIGC:\Users\<UserName>\AppData\Roaming\GPSoftware\Directory Opus\ConfigFiles\Plugins
OPUSPATH_STATEDATAC:\Users\<UserName>\AppData\Local\GPSoftware\Directory Opus\State Data\Plugins