InternetGetConnectedState and LAN
-
Hi, I am using InternetGetConnectedState to determine, whether a LAN connection exists. IBZHTTP_API LRESULT canConnectLAN() { DWORD dwFlags; InternetGetConnectedState(&dwFlags,0); return LRESULT( 0 < (dwFlags & INTERNET_CONNECTION_LAN) ); } I tested this function on two computers(PC1, PC2), both connected to the same LAN. Both have additionally RAS installed and a proxy exists. The LAN connections are activated. PC1: Return value dwFlags is 56, which is correct, it means INTERNET_CONNECTION_LAN (0x02) INTERNET_CONNECTION_PROXY (0x04) INTERNET_RAS_INSTALLED (0x10) INTERNET_CONNECTION_CONFIGURED (0x40) PC2: Return value dwFlags is 50 which is not enough, it means only INTERNET_RAS_INSTALLED (0x10) INTERNET_CONNECTION_CONFIGURED (0x40) When RAS connections with modem are defined on PC2, dwFlags is correct with respect to RAS, 51: INTERNET_CONNECTION_MODEM (0x01) INTERNET_RAS_INSTALLED (0x10) INTERNET_CONNECTION_CONFIGURED (0x40) What could be the reason, that InternetGetConnectedState does not report the LAN connection on PC2? Thank you Werner