X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf9b6266faaa6534b75e5282aab58f1476eecbaa..642163b5a0b9e6147b21f759abb47284ec637765:/src/msw/dialup.cpp diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index e7a00a506b..b3ac982fcf 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -44,11 +44,11 @@ #include "wx/msw/private.h" // must be before #include "dynlib.h" -#if !wxUSE_DYNLIB_CLASS - #error You need wxUSE_DYNLIB_CLASS to be 1 to compile dialup.cpp. -#endif - +#if wxUSE_DYNAMIC_LOADER || wxUSE_DYNLIB_CLASS #include "wx/dynlib.h" +#else +#error You need wxUSE_DYNAMIC_LOADER to be 1 to compile dialup.cpp. +#endif #include "wx/dialup.h" @@ -355,7 +355,7 @@ wxDialUpManagerMSW::wxDialUpManagerMSW() if ( !ms_nDllCount++ ) { // load the RAS library - ms_dllRas = wxDllLoader::LoadLibrary("RASAPI32"); + ms_dllRas = wxDllLoader::LoadLibrary(_T("RASAPI32")); if ( !ms_dllRas ) { wxLogError(_("Dial up functions are unavailable because the remote access service (RAS) is not installed on this machine. Please install it.")); @@ -964,11 +964,10 @@ bool wxDialUpManagerMSW::IsAlwaysOnline() const } // try to use WinInet function first - bool ok; - wxDllType hDll = wxDllLoader::LoadLibrary(_T("WININET"), &ok); - if ( ok ) + wxDllType hDll = wxDllLoader::LoadLibrary(_T("WININET")); + if ( hDll ) { - typedef BOOL (*INTERNETGETCONNECTEDSTATE)(LPDWORD, DWORD); + typedef BOOL (WINAPI *INTERNETGETCONNECTEDSTATE)(LPDWORD, DWORD); INTERNETGETCONNECTEDSTATE pfnInternetGetConnectedState; #define RESOLVE_FUNCTION(type, name) \