VB 如何在程序中判断本机是否连接到网络?
如题,谢谢! 问题点数:20、回复次数:2Top
1 楼supergreenbean(超级绿豆(MSMVP - VB) - 升级归来~)回复于 2006-03-16 21:20:58 得分 5
请参阅 InternetGetConnectedStateTop
2 楼51365133(渊海)回复于 2006-03-16 22:21:13 得分 15
InternetGetConnectedState
BOOL InternetGetConnectedState(
OUT LPDWORD lpdwFlags,
IN DWORD dwReserved
);
Retrieves the connected state of the local system.
Returns TRUE if there is an Internet connection, FALSE otherwise.
lpdwFlags
Address of a double-word variable where the connection description should be returned. Can be a combination of the following values: INTERNET_CONNECTION_MODEM Local system uses a modem to connect to the Internet.
INTERNET_CONNECTION_LAN Local system uses a local area network to connect to the Internet.
INTERNET_CONNECTION_PROXY Local system uses a proxy server to connect to the Internet.
INTERNET_CONNECTION_MODEM_BUSY Local system's modem is busy with a non-Internet connection.
dwReserved
Reserved. Must be set to zero.
Top




