目前我在我的 c# 应用程序中使用 wininet 来检查互联网连接它工作正常
[DllImport("wininet.dll", SetLastError = true)]
public extern static bool InternetGetConnectedState(out int lpdwFlags, int dwReserved);
[Flags]
public enum ConnectionStates
{
Modem = 0x1,
LAN = 0x2,
Proxy = 0x4,
RasInstalled = 0x10,
Offline = 0x20,
Configured = 0x40,
}
但问题是我想阻止互联网但它不成功如何使用wininet实现这一目标?
提前致谢