::Wininet := ..raw.loadDll("Wininet.dll")
::InternetGetConnectedState = Wininet.api("InternetGetConnectedState","bool(int &flag,int
reserved )" )
isOnline = function(){
return InternetGetConnectedState(0,0);
}
io.open()
io.print( isOnline() )
using System.Runtime.InteropServices;
class inet
{
[DllImport("wininet.dll")]
extern static bool InternetGetConnectedState(out int connectionDescription, int
reservedValue);
public bool isOnline()
{
int flag = 0;
bool state = InternetGetConnectedState(out flag, 0);
return state;
}
}
|