Add wxRegKey::GetHkey()

Provide access to the underlying HKEY, especially as we already allow
setting it.
This commit is contained in:
Vadim Zeitlin
2025-07-08 00:58:04 +02:00
parent e3994203cf
commit 41d298abeb
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -139,6 +139,8 @@ public:
bool IsOpened() const { return m_hKey != nullptr; }
// for "if ( !key ) wxLogError(...)" kind of expressions
operator bool() const { return m_dwLastError == 0; }
// return the associated HKEY, possibly null if the key is not opened
WXHKEY GetHkey() const { return m_hKey; }
// operations on the key itself
// explicitly open the key (will be automatically done by all functions
+9
View File
@@ -236,6 +236,15 @@ public:
*/
bool GetFirstValue(wxString& strValueName, long& lIndex);
/**
Return the associated HKEY handle.
It may be null if the key is not opened.
@since 3.3.1
*/
WXHKEY GetHkey() const;
/**
Gets information about the key. Returns @true if successful.