#include "wx/dynlib.h"
-DEFINE_EVENT_TYPE(wxEVT_DIALUP_CONNECTED)
-DEFINE_EVENT_TYPE(wxEVT_DIALUP_DISCONNECTED)
+wxDEFINE_EVENT( wxEVT_DIALUP_CONNECTED, wxDialUpEvent );
+wxDEFINE_EVENT( wxEVT_DIALUP_DISCONNECTED, wxDialUpEvent );
// Doesn't yet compile under VC++ 4, BC++, Watcom C++,
// Wine: no wininet.h
HANDLE hEventRas, // automatic event which RAS signals when status changes
hEventQuit; // manual event which we signal when we terminate
- class WXDLLEXPORT wxDialUpManagerMSW *dialUpManager; // the owner
+ class WXDLLIMPEXP_FWD_CORE wxDialUpManagerMSW *dialUpManager; // the owner
};
// ----------------------------------------------------------------------------
private:
wxDialUpManagerMSW *m_dialUpManager;
- DECLARE_NO_COPY_CLASS(RasTimer)
+ wxDECLARE_NO_COPY_CLASS(RasTimer);
} m_timerStatusPolling;
// thread handle for the thread sitting on connection change event
// this flag tells us whether a call to RasDial() is in progress
static wxDialUpManagerMSW *ms_dialer;
- DECLARE_NO_COPY_CLASS(wxDialUpManagerMSW)
+ wxDECLARE_NO_COPY_CLASS(wxDialUpManagerMSW);
};
// module to destroy helper window created by wxDialUpManagerMSW
if ( dwRet == ERROR_BUFFER_TOO_SMALL )
{
// reallocate the buffer
- rasEntries = (RASENTRYNAME *)realloc(rasEntries, size);
+ void *n = realloc(rasEntries, size);
+ if (n == NULL)
+ {
+ free(rasEntries);
+ return 0;
+ }
+ rasEntries = (RASENTRYNAME *)n;
}
else if ( dwRet != 0 )
{
RASDIALPARAMS rasDialParams;
rasDialParams.dwSize = sizeof(rasDialParams);
- wxStrncpy(rasDialParams.szEntryName, entryName, RAS_MaxEntryName);
+ wxStrlcpy(rasDialParams.szEntryName, entryName.c_str(), RAS_MaxEntryName);
// do we have the username and password?
if ( !username || !password )
}
else
{
- wxStrncpy(rasDialParams.szUserName, username, UNLEN);
- wxStrncpy(rasDialParams.szPassword, password, PWLEN);
+ wxStrlcpy(rasDialParams.szUserName, username.c_str(), UNLEN);
+ wxStrlcpy(rasDialParams.szPassword, password.c_str(), PWLEN);
}
// default values for other fields