X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d38f70b2494626c4c04dbec17b48d1029b7bcd10..9869c26285dc51d13607cddaa04f65ce983653a5:/include/wx/msw/registry.h?ds=sidebyside diff --git a/include/wx/msw/registry.h b/include/wx/msw/registry.h index f5e4124b63..20343a540b 100644 --- a/include/wx/msw/registry.h +++ b/include/wx/msw/registry.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 03.04.1998 -// RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -12,7 +11,11 @@ #ifndef _WX_MSW_REGISTRY_H_ #define _WX_MSW_REGISTRY_H_ -class WXDLLIMPEXP_BASE wxOutputStream; +#include "wx/defs.h" + +#if wxUSE_REGKEY + +class WXDLLIMPEXP_FWD_BASE wxOutputStream; // ---------------------------------------------------------------------------- // class wxRegKey encapsulates window HKEY handle @@ -62,6 +65,22 @@ public: Write // read and write }; + // Different registry views supported under WOW64. + enum WOW64ViewMode + { + // 32 bit registry for 32 bit applications, 64 bit registry + // for 64 bit ones. + WOW64ViewMode_Default, + + // Can be used in 64 bit apps to access 32 bit registry, + // has no effect (i.e. treated as default) in 32 bit apps. + WOW64ViewMode_32, + + // Can be used in 32 bit apps to access 64 bit registry, + // has no effect (i.e. treated as default) in 64 bit apps. + WOW64ViewMode_64 + }; + // information about standard (predefined) registry keys // number of standard keys static const size_t nStdKeys; @@ -72,17 +91,23 @@ public: // get StdKey from root HKEY static StdKey GetStdKeyFromHkey(WXHKEY hkey); - // extacts the std key prefix from the string (return value) and + // extracts the std key prefix from the string (return value) and // leaves only the part after it (i.e. modifies the string passed!) static StdKey ExtractKeyName(wxString& str); // ctors // root key is set to HKCR (the only root key under Win16) - wxRegKey(); + wxRegKey(WOW64ViewMode viewMode = WOW64ViewMode_Default); + // strKey is the full name of the key (i.e. starting with HKEY_xxx...) - wxRegKey(const wxString& strKey); + wxRegKey(const wxString& strKey, + WOW64ViewMode viewMode = WOW64ViewMode_Default); + // strKey is the name of key under (standard key) keyParent - wxRegKey(StdKey keyParent, const wxString& strKey); + wxRegKey(StdKey keyParent, + const wxString& strKey, + WOW64ViewMode viewMode = WOW64ViewMode_Default); + // strKey is the name of key under (previously created) keyParent wxRegKey(const wxRegKey& keyParent, const wxString& strKey); // dtor closes the key @@ -101,6 +126,8 @@ public: // get infomation about the key // get the (full) key name. Abbreviate std root keys if bShortPrefix. wxString GetName(bool bShortPrefix = true) const; + // Retrieves the registry view used by this key. + WOW64ViewMode GetView() const { return m_viewMode; } // return true if the key exists bool Exists() const; // get the info about key (any number of these pointers may be NULL) @@ -231,16 +258,18 @@ private: wxString FormatValue(const wxString& name) const; - WXHKEY m_hKey, // our handle - m_hRootKey; // handle of the top key (i.e. StdKey) - wxString m_strKey; // key name (relative to m_hRootKey) - - AccessMode m_mode; // valid only if key is opened - long m_dwLastError; // last error (0 if none) + WXHKEY m_hKey, // our handle + m_hRootKey; // handle of the top key (i.e. StdKey) + wxString m_strKey; // key name (relative to m_hRootKey) + WOW64ViewMode m_viewMode; // which view to select under WOW64 + AccessMode m_mode; // valid only if key is opened + long m_dwLastError; // last error (0 if none) - DECLARE_NO_COPY_CLASS(wxRegKey) + wxDECLARE_NO_COPY_CLASS(wxRegKey); }; +#endif // wxUSE_REGKEY + #endif // _WX_MSW_REGISTRY_H_