return str;
}
-#ifdef __GNUWIN32__
+#if defined( __GNUWIN32__ ) && !defined(wxUSE_NORLANDER_HEADERS)
bool wxRegKey::GetKeyInfo(size_t* pnSubKeys,
size_t* pnMaxKeyLen,
size_t* pnValues,
#endif // WIN16/32
}
+// returns TRUE if this key has any values
+bool wxRegKey::HasValues() const
+{
+ // suppress possible messages from GetFirstValue()
+ wxLogNull nolog;
+
+ // just call GetFirstValue with dummy parameters
+ wxString str;
+ long l;
+ return CONST_CAST GetFirstValue(str, l);
+}
+
// returns TRUE if this key has any subkeys
bool wxRegKey::HasSubkeys() const
{
wxChar szValueName[1024]; // @@ use RegQueryInfoKey...
DWORD dwValueLen = WXSIZEOF(szValueName);
- lIndex++;
- m_dwLastError = RegEnumValue((HKEY) m_hKey, lIndex,
+ m_dwLastError = RegEnumValue((HKEY) m_hKey, lIndex++,
szValueName, &dwValueLen,
RESERVED,
NULL, // [out] type