X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8c72298ec07a4f296ffde211360682447b9d159..33754c4d83c59b7523a6da0c4fb21079cb60301c:/src/msw/dialup.cpp diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index bf03145dc5..ff5cdfa3db 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -56,7 +56,11 @@ DEFINE_EVENT_TYPE(wxEVT_DIALUP_CONNECTED) DEFINE_EVENT_TYPE(wxEVT_DIALUP_DISCONNECTED) // Doesn't yet compile under VC++ 4, BC++, Watcom C++: no wininet.h -#if !defined(__BORLANDC__) && !defined(__GNUWIN32_OLD__) && !( defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 0, 5 ) ) && !defined(__WATCOMC__) && ! (defined(__VISUALC__) && (__VISUALC__ < 1020)) +#if !defined(__BORLANDC__) && \ + (!defined(__GNUWIN32__) || wxCHECK_W32API_VERSION(0, 5)) && \ + !defined(__GNUWIN32_OLD__) && \ + !defined(__WATCOMC__) && \ + (!defined(__VISUALC__) || (__VISUALC__ >= 1020)) #include #include @@ -860,9 +864,17 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, if ( dwRet != 0 ) { +#if wxUSE_UNICODE + // can't pass a wxWCharBuffer through ( ... ) + wxLogError(_("Failed to %s dialup connection: %s").data(), + async ? _("initiate").data() : _("establish").data(), + GetErrorString(dwRet).c_str()); +#else + // can't pass a wxWCharBuffer through ( ... ) wxLogError(_("Failed to %s dialup connection: %s"), - async ? _("initiate") : _("establish"), + wxString(async ? _("initiate") : _("establish")).c_str(), GetErrorString(dwRet).c_str()); +#endif // we should still call RasHangUp() if we got a non 0 connection if ( ms_hRasConnection ) @@ -956,7 +968,7 @@ bool wxDialUpManagerMSW::IsAlwaysOnline() const wxDllType hDll = wxDllLoader::LoadLibrary(_T("WININET"), &ok); if ( ok ) { - typedef BOOL (*INTERNETGETCONNECTEDSTATE)(LPDWORD, DWORD); + typedef BOOL (WINAPI *INTERNETGETCONNECTEDSTATE)(LPDWORD, DWORD); INTERNETGETCONNECTEDSTATE pfnInternetGetConnectedState; #define RESOLVE_FUNCTION(type, name) \