LoadOrSaveConfig(
int:iOperation,
LPDOPUSPLUGINCONFIGDATA:lpCfgData
)
→ BOOL
| OPUSCFG_LOAD | Load configuration data |
| OPUSCFG_SAVE | Save configuration data |
The LoadOrSaveConfig function lets you load or save simple configuration data in XML format without needing to perform the XML parsing yourself.
The OPUSPLUGINCONFIGDATA structure contains the name of the configuration file to load or save, and an array of DOPUSPLUGINCONFIGITEM structures which define the actual data. The fields in the OPUSPLUGINCONFIGDATA structure are:
The DOPUSPLUGINCONFIGITEM array defines the configuration data to load or save. Each member of the array specifies one item of data. Each item has a name, a type, as well as the actual data. The fields of this structure are:
| DPCITYPE_Bool | Boolean value (TRUE or FALSE) |
| DPCITYPE_Int | Signed 32-bit integer value |
| DPCITYPE_DWORD | Unsigned 32-bit integer value |
| DPCITYPE_LPSTR | ANSI string (null-terminated) |
| DPCITYPE_LPWSTR | Unicode string (null-terminated) |
| DPCITYPE_Binary | Arbitrary binary data |
| DPCITYPE_LOGFONT | LOGFONT structure |
| DPCITYPE_Child | Nested child structure (no data) |
Note that several of the data types have special rules which apply to them:
See the supplied RAR sample VFS plugin for an example of how to use the LoadOrSaveConfig function.