none
如何截获改变IP地址这一事件? RRS feed

  • 问题

  • 我要用VC编写一段程序,来实现如下功能:
    当我改变这台机器的IP地址的时候,我的程序会立刻截获这一动作并做出相应,
    如弹出一个提示框,
    关键是我怎么能够截获更改IP地址这一事件呢?

    注意,我说的是通过 网上邻居->本地链接->属性->Internet协议(TCP/IP)->属性->使用下面的IP地址,
    修改后点确定后,此时,截获修改IP的事件,明白我的意思了吧,呵呵

    • 已移动 小鱼儿 2009年5月19日 9:21 ([Loc]From:Windows Vista 开发相关讨论)
    2009年4月13日 1:09

答案

  • 看看下列WMI事件是否被触发
    NameDescription
    MSNdis_NotifyAdapterRemoval Sent when a NIC is uninstalled or physically removed from a system or a connection is disabled
    MSNdis_NotifyAdapterArrival Sent when a NIC is activated or inserted into a system or a connection is enabled
    MSNdis_NotifyVcArrival Sent when a virtual connection is established
    MSNdis_StatusResetStart Sent when a NIC starts a reset operation
    MSNdis_StatusResetEnd Sent when a NIC ends a reset operation
    MSNdis_StatusMediaConnect Sent when the NIC establishes a link layer connection and when the network cable is plugged in or a WLAN NIC comes into range
    MSNdis_StatusMediaDisconnect Sent when the NIC loses a link layer connection, when the network cable is unplugged or a WLAN NIC goes out of range
    MSNdis_StatusMediaSpecificIndication Sends media specific status indication
    MSNdis_StatusLinkSpeedChange Sent when the link speed changes and informs the subscriber of the new incoming and outgoing speed
    MSNdis_StatusProtocolBind Sent when a new transport is bound to the NIC
    MSNdis_StatusProtocolUnbind Sent when a transport is unbound from a NIC

    MSMVP VC++
    2009年4月13日 17:52
    版主

全部回复

  • 看看下列WMI事件是否被触发
    NameDescription
    MSNdis_NotifyAdapterRemoval Sent when a NIC is uninstalled or physically removed from a system or a connection is disabled
    MSNdis_NotifyAdapterArrival Sent when a NIC is activated or inserted into a system or a connection is enabled
    MSNdis_NotifyVcArrival Sent when a virtual connection is established
    MSNdis_StatusResetStart Sent when a NIC starts a reset operation
    MSNdis_StatusResetEnd Sent when a NIC ends a reset operation
    MSNdis_StatusMediaConnect Sent when the NIC establishes a link layer connection and when the network cable is plugged in or a WLAN NIC comes into range
    MSNdis_StatusMediaDisconnect Sent when the NIC loses a link layer connection, when the network cable is unplugged or a WLAN NIC goes out of range
    MSNdis_StatusMediaSpecificIndication Sends media specific status indication
    MSNdis_StatusLinkSpeedChange Sent when the link speed changes and informs the subscriber of the new incoming and outgoing speed
    MSNdis_StatusProtocolBind Sent when a new transport is bound to the NIC
    MSNdis_StatusProtocolUnbind Sent when a transport is unbound from a NIC

    MSMVP VC++
    2009年4月13日 17:52
    版主
  • 谢谢,问题解决了
    2009年4月14日 0:35
  • 请问你是监听的哪个事件呢??如何解决的呢
    2012年9月11日 8:26