// test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "test.h"
#include <Wininet.h>
#include <Sensapi.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/
// The one and only application object
CWinApp theApp;
using namespace std;
void Fun_InternetGetConnectedState()
{
//#define INTERNET_CONNECTION_MODEM 1
//#define INTERNET_CONNECTION_LAN 2
//#define INTERNET_CONNECTION_PROXY 4
//#define INTERNET_CONNECTION_MODEM_BUSY 8
DWORD flags;//上网方式
BOOL m_bOnline=TRUE;//是否在线
m_bOnline=InternetGetConnectedState(&flags,0);
if(m_bOnline)//在线