I'm using wxRegKey to read some value in the registry. This is what I'm doing:
Code: Select all
wxRegKey* regKey = new wxRegKey(_T("HKEY_CLASSES_ROOT\\.test"));
if (regKey->Exists()) {
wxString defaultValue = regKey->QueryDefaultValue();
if (defaultValue != wxEmptyString) {
// etc.
}
}
So is there any way to prevent this error? For example, is there any way to check if the default value exists before querying it? I've searched the help file but couldn't find anything. Any ideas?
Thanks,
Laurent