#include "wx/event.h"
#endif
+#include "wx/timer.h"
+#include "wx/app.h"
+#include "wx/generic/choicdgg.h"
+
#include "wx/msw/private.h" // must be before #include "dynlib.h"
#if !wxUSE_DYNLIB_CLASS
#include "wx/dialup.h"
-// Doesn't yet compile under VC++ 4, BC++, mingw, Watcom C++: no wininet.h
-#if !defined(__BORLANDC__) && !defined(__GNUWIN32_OLD__) && !defined(__GNUWIN32__) && !defined(__WATCOMC__) && ! (defined(__VISUALC__) && (__VISUALC__ < 1020))
+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(__WATCOMC__) && \
+ (!defined(__VISUALC__) || (__VISUALC__ >= 1020))
+ // FIXME: add this back as soon as wxCHECK_W32API_VERSION is chcked in
+ // (!defined(__GNUWIN32__) || wxCHECK_W32API_VERSION(0, 5)) && \
#include <ras.h>
#include <raserror.h>
{
// an error occured
wxLogError(_("Cannot find active dialup connection: %s"),
- GetErrorString(dwRet));
+ GetErrorString(dwRet).c_str());
return 0;
}
}
{
if ( !SetEvent(m_data.hEventQuit) )
{
- wxLogLastError("SetEvent(RasThreadQuit)");
+ wxLogLastError(_T("SetEvent(RasThreadQuit)"));
}
CloseHandle(m_hThread);
if ( dwError )
{
wxLogError(_("Failed to establish dialup connection: %s"),
- GetErrorString(dwError));
+ GetErrorString(dwError).c_str());
// we should still call RasHangUp() if we got a non 0 connection
if ( ms_hRasConnection )
else if ( dwRet != 0 )
{
// some other error - abort
- wxLogError(_("Failed to get ISP names: %s"), GetErrorString(dwRet));
+ wxLogError(_("Failed to get ISP names: %s"),
+ GetErrorString(dwRet).c_str());
free(rasEntries);
{
wxLogError(_("Failed to %s dialup connection: %s"),
async ? _("initiate") : _("establish"),
- GetErrorString(dwRet));
+ GetErrorString(dwRet).c_str());
// we should still call RasHangUp() if we got a non 0 connection
if ( ms_hRasConnection )
if ( dwRet != 0 )
{
wxLogError(_("Failed to terminate the dialup connection: %s"),
- GetErrorString(dwRet));
+ GetErrorString(dwRet).c_str());
}
ms_isConnected = FALSE;
if ( dwRet != 0 )
{
wxLogDebug(wxT("RasConnectionNotification() failed: %s"),
- GetErrorString(dwRet));
+ GetErrorString(dwRet).c_str());
CleanUpThreadData();
}