X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/007007c5e4da49affb67de71524372ab8706dd36..bd947cc9f002826c01e1413e36c5ae99fc6124a8:/src/msw/registry.cpp?ds=sidebyside diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index 188b50632b..8305c63eb8 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -12,7 +12,7 @@ // - add high level functions (RegisterOleServer, ...) /////////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "registry.h" #endif @@ -36,7 +36,7 @@ #define WIN32_LEAN_AND_MEAN */ -#include +#include "wx/msw/wrapwin.h" #ifdef __WXWINCE__ #include "wx/msw/private.h" @@ -872,14 +872,12 @@ bool wxRegKey::QueryValue(const wxChar *szValue, strValue.Empty(); } else { - RegString pBuf = (RegString)strValue.GetWriteBuf(dwSize); m_dwLastError = RegQueryValueEx((HKEY) m_hKey, WXSTRINGCAST szValue, RESERVED, &dwType, - pBuf, + (RegString)(wxChar*)wxStringBuffer(strValue, dwSize), &dwSize); - strValue.UngetWriteBuf(); // expand the var expansions in the string unless disabled #ifndef __WXWINCE__ @@ -893,10 +891,9 @@ bool wxRegKey::QueryValue(const wxChar *szValue, ok = ::ExpandEnvironmentStrings ( strValue, - strExpValue.GetWriteBuf(dwExpSize), + wxStringBuffer(strExpValue, dwExpSize), dwExpSize ) != 0; - strExpValue.UngetWriteBuf(); strValue = strExpValue; }