Resources | Resources |



Public settings

Components that use public (native or non-native) settings claim ownership of a particular node of the tree in their CIF, where they also provide information to the registry about their store. For example, for an .ini file-based store, the component specifies the EFS path to the .ini file.

Components can use ACLs to allow or deny access to a public store. A settings ACL works exactly the same as a file system ACL.

The CIF entry specifies the following:

  • The ClassID of the application or component that will own the store for a native store, the ClassID of the custom class for a non-native store
  • A key, which is a string identifying the subtree in the registry
  • The file name, if the store is an .ini file
  • A quota, if the store is in heap, which specifies the maximum amount of memory to be used for the store
  • Optional ACLs (Access Control List)

    If no ACLs are specified, only the owner of the store has read and write privileges.

For example, the following CIF entry registers an .ini file settings store. SettingsCIFHelpers is a script that is needed to register settings in a CIF.

local s = require 'SettingsCIFHelpers'

-- register my settings at "/myApp/myIniSettings/..."
s:RegisterIniFile {
   owner = 0x12345678,           -- class id of my component
   key = "/myApp/myIniSettings",
   file = "mysettings.ini",
  • owner specifies the ClassID of the application or component
  • key identifies the registry subtree
  • file specifies the name of the .ini file

An application uses an ISettings object to access public settings. For public settings, the ISettings object is obtained by calling IEnv_CreateInstance() with the AEECLSID_SettingsReg ClassID.