Patch level :4.0 820
Files correlati : Ricompilazione Demo : [ ] Commento :aggiunto il metodo xvt_net_get_status() per sapere se il computer e' connesso ad una rete o ad internet (decisivo per poter avviare l'installazione via web) git-svn-id: svn://10.65.10.50/trunk@15770 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1454f858cb
commit
c973625d01
@ -4,6 +4,7 @@
|
||||
#include "wx/calctrl.h"
|
||||
#include "wx/colordlg.h"
|
||||
#include "wx/confbase.h"
|
||||
#include "wx/dialup.h"
|
||||
#include "wx/fileconf.h"
|
||||
#include "wx/fontdlg.h"
|
||||
#include "wx/fs_zip.h"
|
||||
@ -4355,6 +4356,27 @@ BOOLEAN xvt_chr_is_alnum(int c)
|
||||
return (c <= 255) && wxIsalnum(c);
|
||||
}
|
||||
|
||||
int xvt_net_get_status()
|
||||
{
|
||||
int nStatus = 0;
|
||||
wxDialUpManager* dum = wxDialUpManager::Create();
|
||||
if (dum != NULL)
|
||||
{
|
||||
if (dum->IsOk() && dum->IsOnline())
|
||||
{
|
||||
nStatus = 0x1; // 1 = Online
|
||||
|
||||
if (dum->IsAlwaysOnline())
|
||||
nStatus |= 0x2; // 2 = Always Online
|
||||
|
||||
wxArrayString isp;
|
||||
if (dum->GetISPNames(isp) > 0)
|
||||
nStatus |= 0x4; // 4 = Internet enabled
|
||||
}
|
||||
delete dum;
|
||||
}
|
||||
return nStatus;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// XVT system calls (added by Guy)
|
||||
|
@ -370,6 +370,8 @@ XVTDLL ULONG xvt_odbc_execute(XVT_ODBC handle, const char* sql, ODBC_CALLBACK cb
|
||||
XVTDLL BOOLEAN xvt_mail_send(const char* to, const char* cc, const char* ccn,
|
||||
const char* subject, const char* msg, const char* attach, BOOLEAN ui);
|
||||
|
||||
XVTDLL int xvt_net_get_status();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user