X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/414721d003ccfc07804166774543349c2845cc14..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/msw/iniconf.cpp diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp index b9a1a09887..604a452962 100644 --- a/src/msw/iniconf.cpp +++ b/src/msw/iniconf.cpp @@ -16,7 +16,7 @@ #pragma hdrstop #endif -#if wxUSE_CONFIG +#if wxUSE_INICONF #ifndef WX_PRECOMP #include "wx/msw/wrapwin.h" @@ -257,13 +257,13 @@ bool wxIniConfig::IsEmpty() const { wxChar szBuf[1024]; - GetPrivateProfileString(m_strGroup.wx_str(), NULL, _T(""), + GetPrivateProfileString(m_strGroup.wx_str(), NULL, wxT(""), szBuf, WXSIZEOF(szBuf), m_strLocalFilename.wx_str()); if ( !wxIsEmpty(szBuf) ) return false; - GetProfileString(m_strGroup.wx_str(), NULL, _T(""), szBuf, WXSIZEOF(szBuf)); + GetProfileString(m_strGroup.wx_str(), NULL, wxT(""), szBuf, WXSIZEOF(szBuf)); if ( !wxIsEmpty(szBuf) ) return false; @@ -284,14 +284,14 @@ bool wxIniConfig::DoReadString(const wxString& szKey, wxString *pstr) const // first look in the private INI file // NB: the lpDefault param to GetPrivateProfileString can't be NULL - GetPrivateProfileString(m_strGroup.wx_str(), strKey.wx_str(), _T(""), + GetPrivateProfileString(m_strGroup.wx_str(), strKey.wx_str(), wxT(""), szBuf, WXSIZEOF(szBuf), m_strLocalFilename.wx_str()); if ( wxIsEmpty(szBuf) ) { // now look in win.ini wxString strKey = GetKeyName(path.Name()); GetProfileString(m_strGroup.wx_str(), strKey.wx_str(), - _T(""), szBuf, WXSIZEOF(szBuf)); + wxT(""), szBuf, WXSIZEOF(szBuf)); } if ( wxIsEmpty(szBuf) ) @@ -350,14 +350,32 @@ bool wxIniConfig::DoWriteString(const wxString& szKey, const wxString& szValue) m_strLocalFilename.wx_str()) != 0; if ( !bOk ) + { wxLogLastError(wxT("WritePrivateProfileString")); + } return bOk; } bool wxIniConfig::DoWriteLong(const wxString& szKey, long lValue) { - return Write(szKey, wxString::Format(_T("%ld"), lValue)); + return Write(szKey, wxString::Format(wxT("%ld"), lValue)); +} + +bool wxIniConfig::DoReadBinary(const wxString& WXUNUSED(key), + wxMemoryBuffer * WXUNUSED(buf)) const +{ + wxFAIL_MSG("not implemented"); + + return false; +} + +bool wxIniConfig::DoWriteBinary(const wxString& WXUNUSED(key), + const wxMemoryBuffer& WXUNUSED(buf)) +{ + wxFAIL_MSG("not implemented"); + + return false; } bool wxIniConfig::Flush(bool /* bCurrentOnly */) @@ -389,7 +407,9 @@ bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso) NULL, m_strLocalFilename.wx_str()) != 0; if ( !bOk ) + { wxLogLastError(wxT("WritePrivateProfileString")); + } return bOk; } @@ -404,7 +424,9 @@ bool wxIniConfig::DeleteGroup(const wxString& szKey) NULL, m_strLocalFilename.wx_str()) != 0; if ( !bOk ) + { wxLogLastError(wxT("WritePrivateProfileString")); + } return bOk; } @@ -455,4 +477,4 @@ bool wxIniConfig::RenameGroup(const wxString& WXUNUSED(oldName), return false; } -#endif // wxUSE_CONFIG +#endif // wxUSE_INICONF