diff --git a/include/wx/log.h b/include/wx/log.h index 3228bed7ff..7f0112c04f 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -1479,13 +1479,13 @@ wxSafeShowMessage(const wxString& title, const wxString& text); #define wxLogApiError(api, rc) \ wxLogDebug(wxT("%s(%d): '%s' failed with error 0x%08lx (%s)."), \ __FILE__, __LINE__, api, \ - (long)rc, wxSysErrorMsg(rc)) + (long)rc, wxSysErrorMsgStr(rc)) #else // !VC++ #define wxLogApiError(api, rc) \ wxLogDebug(wxT("In file %s at line %d: '%s' failed with ") \ wxT("error 0x%08lx (%s)."), \ __FILE__, __LINE__, api, \ - (long)rc, wxSysErrorMsg(rc)) + (long)rc, wxSysErrorMsgStr(rc)) #endif // VC++/!VC++ #define wxLogLastError(api) wxLogApiError(api, wxSysErrorCode()) diff --git a/src/common/log.cpp b/src/common/log.cpp index 7c1e9e89bb..137c05a0cc 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -418,7 +418,7 @@ wxLog::CallDoLogNow(wxLogLevel level, { const long err = static_cast(num); - suffix.Printf(_(" (error %ld: %s)"), err, wxSysErrorMsg(err)); + suffix.Printf(_(" (error %ld: %s)"), err, wxSysErrorMsgStr(err)); } #if wxUSE_LOG_TRACE diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 3f0cd2caeb..512d51088e 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -2411,7 +2411,7 @@ wxMBConv_iconv::ToWChar(wchar_t *dst, size_t dstLen, if (ICONV_FAILED(cres, srcLen)) { //VS: it is ok if iconv fails, hence trace only - wxLogTrace(TRACE_STRCONV, wxT("iconv failed: %s"), wxSysErrorMsg(wxSysErrorCode())); + wxLogTrace(TRACE_STRCONV, wxT("iconv failed: %s"), wxSysErrorMsgStr(wxSysErrorCode())); return wxCONV_FAILED; } @@ -2479,7 +2479,7 @@ size_t wxMBConv_iconv::FromWChar(char *dst, size_t dstLen, if (ICONV_FAILED(cres, inbuflen)) { - wxLogTrace(TRACE_STRCONV, wxT("iconv failed: %s"), wxSysErrorMsg(wxSysErrorCode())); + wxLogTrace(TRACE_STRCONV, wxT("iconv failed: %s"), wxSysErrorMsgStr(wxSysErrorCode())); return wxCONV_FAILED; } diff --git a/src/msw/debughlp.cpp b/src/msw/debughlp.cpp index 592595d4a5..a1719f2902 100644 --- a/src/msw/debughlp.cpp +++ b/src/msw/debughlp.cpp @@ -212,7 +212,7 @@ const wxString& wxDbgHelpDLL::GetErrorMessage() void wxDbgHelpDLL::LogError(const wxChar *func) { ::OutputDebugString(wxString::Format(wxT("dbghelp: %s() failed: %s\r\n"), - func, wxSysErrorMsg(::GetLastError())).t_str()); + func, wxSysErrorMsgStr(::GetLastError())).t_str()); } // ---------------------------------------------------------------------------- diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index 6337b847ed..9ac7a9eed1 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -470,7 +470,7 @@ wxString wxDialUpManagerMSW::GetErrorString(DWORD error) { case ERROR_INVALID_PARAMETER: // this was a standard Win32 error probably - return wxString(wxSysErrorMsg(error)); + return wxSysErrorMsgStr(error); default: { @@ -1258,7 +1258,7 @@ static DWORD wxRasMonitorThread(wxRasThreadData *data) ( wxT("WaitForMultipleObjects(RasMonitor) failed: 0x%08lx (%s)"), err, - wxSysErrorMsg(err) + wxSysErrorMsgStr(err) ); // no sense in continuing, who knows if the handles we're diff --git a/src/msw/secretstore.cpp b/src/msw/secretstore.cpp index 590816be98..3cc4d696b5 100644 --- a/src/msw/secretstore.cpp +++ b/src/msw/secretstore.cpp @@ -27,7 +27,7 @@ #include "wx/secretstore.h" #include "wx/private/secretstore.h" -#include "wx/log.h" // wxSysErrorMsg() +#include "wx/log.h" // wxSysErrorMsgStr() // Somewhat surprisingly, wincred.h is not self-contained and relies on some // standard Windows macros being defined without including the headers defining @@ -84,7 +84,7 @@ public: if ( !::CredWrite(&cred, 0) ) { - errmsg = wxSysErrorMsg(); + errmsg = wxSysErrorMsgStr(); return false; } @@ -103,7 +103,7 @@ public: // Not having the password for this service/user combination is not // an error, but anything else is. if ( ::GetLastError() != ERROR_NOT_FOUND ) - errmsg = wxSysErrorMsg(); + errmsg = wxSysErrorMsgStr(); return NULL; } @@ -123,7 +123,7 @@ public: { // Same logic as in Load() above. if ( ::GetLastError() != ERROR_NOT_FOUND ) - errmsg = wxSysErrorMsg(); + errmsg = wxSysErrorMsgStr(); return false; } diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp index f696ab9c16..0805e1e19a 100644 --- a/src/msw/thread.cpp +++ b/src/msw/thread.cpp @@ -1371,7 +1371,7 @@ void WXDLLIMPEXP_BASE wxWakeUpMainThread() wxS("Failed to wake up main thread: PostThreadMessage(WM_NULL) ") wxS("failed with error 0x%08lx (%s)."), ec, - wxSysErrorMsg(ec) + wxSysErrorMsgStr(ec) ); } }