#ifndef __WXWINCE__
{ HKEY_PERFORMANCE_DATA, wxT("HKEY_PERFORMANCE_DATA"), wxT("HKPD") },
#endif
-#if WINVER >= 0x0400 && !defined(__WXWINCE__)
+#ifdef HKEY_CURRENT_CONFIG
{ HKEY_CURRENT_CONFIG, wxT("HKEY_CURRENT_CONFIG"), wxT("HKCC") },
-#if !defined(__GNUWIN32__) && !defined(__WXWINCE__)
+#endif
+#ifdef HKEY_DYN_DATA
{ HKEY_DYN_DATA, wxT("HKEY_DYN_DATA"), wxT("HKDD") }, // short name?
-#endif //GNUWIN32
-#endif //WINVER >= 4.0
+#endif
};
// the registry name separator (perhaps one day MS will change it to '/' ;-)
bool wxRegKey::Open(AccessMode mode)
{
if ( IsOpened() )
- return true;
+ {
+ if ( mode <= m_mode )
+ return true;
+
+ // we had been opened in read mode but now must be reopened in write
+ Close();
+ }
HKEY tmpKey;
m_dwLastError = ::RegOpenKeyEx
}
m_hKey = (WXHKEY) tmpKey;
+ m_mode = mode;
+
return true;
}
if ( !QueryValue(name, &value) )
break;
- rhs.Printf(_T("dword:%08x"), value);
+ rhs.Printf(_T("dword:%08x"), (unsigned int)value);
}
break;