在windows系统下,当本地网络连通时,windows会有一个提示,如本地连接  网络电缆没有接好本地连接 现在已连接
速度“10M/100M”如果,我的程序要监视这个状态,应该怎么实现!请各位大虾指教,解决后立即结贴,100分相送!

解决方案 »

  1.   

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/syncmgr/syncmgr/isensnetwork_connectionlost.aspVC的解法, 實現一個Com接口, 
    我以前改過到delphi, 但不成功
      

  2.   

    多谢版主 aiirii(ari-爱的眼睛) ( )试试看
      

  3.   

    if GetSystemMetrics(SM_NETWORK) AND $01 = $01 then 
    ShowMessage('Machine is attached to network') elseShowMessage('Machine is not attached to network'
     
      

  4.   

    if GetSystemMetrics(SM_NETWORK) AND $01 = $01 then 
    .这个要自己不断的运行监测啊!!!
      

  5.   

    if GetSystemMetrics(SM_NETWORK) AND $01 = $01 then 
    这个if语句的条件怎么这么怪AND $01 = $01呵呵,不懂,,各位老大,帮解释一下,,
      

  6.   

    SM_NETWORKThe least significant bit is set if a network is present; otherwise, it is cleared. The other bits are reserved for future use.意思是检测字节的最后一位if ((GetSystemMetrics(SM_NETWORK) AND $01) = $01) then不好意思,pascal语法不强
      

  7.   

    不行呀,我把网线拔掉,还是Machine is attached to network郁闷
      

  8.   

    其实这样做的意义不是很大,程序关心只要网络能用就行了,现在采用的方法是:
    用IsNetworkAlive这个API,检测网络能用就行了 
      
    结了,,感觉两位虾关注,