Windows上何时准备好网络接口的通知 [英] Notification of when a network interface is ready on Windows

查看:138
本文介绍了Windows上何时准备好网络接口的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows XP下启动并准备好网络接口后,如何接收通知?

How do I receive notification when a network interface is brought up and ready, under Windows XP?

就绪表示该接口已经通过DHCP获得了网络IP地址并可以使用.

Ready means the interface already obtained a network IP address via DHCP and is ready to use.

推荐答案

当接口准备就绪时,您绝对可以得到一个事件!只需使用IPHelper!您应该寻找的功能是NotifyAddrChange http: //msdn.microsoft.com/zh-cn/library/aa366329%28v=VS.85%29.aspx ,并且从Windows 2000开始可用.当适配器启动并运行时,将对其进行分配IP地址,并因此触发了回调.

You can definitely get an event when an interface is ready! Just use IPHelper! The function you shall be looking for is NotifyAddrChange http://msdn.microsoft.com/en-us/library/aa366329%28v=VS.85%29.aspx and it is available starting from Windows 2000. When an adapter is up and running, it will be assigned an IP address, and thus triggered the callback.

被触发时,可以使用GetAdapterAddress来计算所需的信息.在Vista或更高版本上,有NotifyIpInterfaceChange可以直接告诉哪个适配器进行了IP更改.

A GetAdapterAddress can be used when triggered to figure the information you need. On Vista or above there is NotifyIpInterfaceChange that directly tell which adapter has IP change.

这篇关于Windows上何时准备好网络接口的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆