本文介绍了检测到网络电缆拔出时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows会知道您何时从NIC中移除网络电缆。有没有通过API在C ++中确定这个程序的方式?

Windows knows when you have removed the network cable from your NIC. Is there a programmatic way to determine this via API in C++?

注意:我不是使用.NET,这是一个封闭的局域网(不连接到互联网)

Note: I am not using .NET and this is for a closed LAN (not connected to Internet ever)

推荐答案

Raymond Chen 最近类似的东西。以下是相关的。我认为MIB_IPADDR_DISCONNECTED标志是你正在寻找。

Raymond Chen blogged about something similar recently. Here is the relevant documentation. I think the MIB_IPADDR_DISCONNECTED flag is what you are looking for.

这篇关于检测到网络电缆拔出时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-09 03:22