X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8a8c41dd9315f3ed4aa287bd439bdd0a2c650458..b5435dccd098ae153c3b7b3b8fca8dd0d763986c:/src/msw/registry.cpp diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index caf1a31d15..c18f1de8d4 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -36,7 +36,7 @@ #define WIN32_LEAN_AND_MEAN */ -#include +#include "wx/msw/wrapwin.h" #ifdef __WXWINCE__ #include "wx/msw/private.h" @@ -94,7 +94,7 @@ aStdKeys[] = // useful for Windows programmers: makes somewhat more clear all these zeroes // being passed to Windows APIs -#define RESERVED (NULL) +#define RESERVED (0) // ---------------------------------------------------------------------------- // macros @@ -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; }