Constructor. Opens the user key as an overrideable key (see class for details). Also opens the plugins key in read/write mode if possible, otherwise read-only.
| 215 | // Also opens the plugins key in read/write mode if possible, otherwise read-only. |
| 216 | // |
| 217 | Settings::Settings() noexcept(false) |
| 218 | : COMPluginProvider(), |
| 219 | PipelinePluginProvider(), |
| 220 | m_UserKey(PCC_SETTINGS_KEY), |
| 221 | m_IconsKey(PCC_ICONS_KEY), |
| 222 | m_PipelinePluginsKey(PCC_PIPELINE_PLUGINS_KEY), |
| 223 | m_TempPipelinePluginsKey(PCC_TEMP_PIPELINE_PLUGINS_KEY), |
| 224 | m_UserFormsKey(HKEY_CURRENT_USER, PCC_FORMS_KEY, true), |
| 225 | m_UserPluginsKey(), |
| 226 | m_GlobalPluginsKey(), |
| 227 | m_GlobalPluginsKeyReadOnly(false), |
| 228 | m_Revised(false) |
| 229 | { |
| 230 | // Open user plugins key. |
| 231 | m_UserPluginsKey.Open(HKEY_CURRENT_USER, PCC_PLUGINS_KEY, true); |
| 232 | |
| 233 | // Open global plugins key. |
| 234 | m_GlobalPluginsKey.Open(HKEY_LOCAL_MACHINE, PCC_PLUGINS_KEY, true); |
| 235 | if (!m_GlobalPluginsKey.Valid()) { |
| 236 | // Perhaps this is because we're running as a restricted user who doesn't |
| 237 | // have full access to HKLM. Open as read-only. |
| 238 | m_GlobalPluginsKey.Open(HKEY_LOCAL_MACHINE, PCC_PLUGINS_KEY, false, KEY_READ); |
| 239 | m_GlobalPluginsKeyReadOnly = true; |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | // |
| 244 | // Checks whether user wants to consider hidden shares when |