是RAS吗?如果是RAS,就用 RasEnumConnections

解决方案 »

  1.   

    RAS是什么意思,我的意思是想实现windows2000下的任务栏显示的连接小图标的功能。
      

  2.   

    RAS是拨号的连接,其他的可用 InternetGetConnectedState不过这个东西在98下有BUG...
      

  3.   

    RAS是拨号的连接,其他的可用 InternetGetConnectedState不过这个东西在98下有BUG...
      

  4.   

    是本地连接还是拨号连接?
    RAS是指拨号连接。
    至于本地连接的状态怎么判断,我就不知道了呀!:(
      

  5.   

    InternetGetConnectionState98下有点BUG...TMD!!CSDN太破了,几次发不了!
      

  6.   

    InternetGetConnectionState98下有点BUG...TMD!!CSDN太破了,几次发不了!
      

  7.   

    我是时刻判断网络是否处于连接,如把这个函数放到Timer中,会使机子死掉的!还有别的方法吗?
      

  8.   

    if GetSystemMetrics(SM_NETWORK) AND $01 = $01 then
        ShowMessage('Machine is attached to network') else
        ShowMessage('Machine is not attached to network'
    试试这个吧
    我在别处看到的
      

  9.   

    rhinoceros(犀牛)老兄,我试了一下你的方法,不行呀,不管什么状态都是'Machine is attached to network'
      

  10.   

    检测计算机是否联网比较简单的做法可以通过一个 Win32 Internet(WinInet) 函数 InternetCheckConnection来实现;
    这个函数的功能是检查是否能够建立 Internet 连接。
    它的实现是在 %SystemRoot%\System32\wininet.dll 中,Delphi 调用声明在 WinInet.pas 中,
    其 API 声明如下:BOOL InternetCheckConnection(
        IN LPCSTR lpszUrl,
        IN DWORD dwFlags,
        IN DWORD dwReserved
    );
    //
    Uses WinInet;
    procedure TForm1.Button1Click(Sender: TObject);
    begin
        if InternetCheckConnection('http://www.yahoo.com/', 1, 0) then
            edit1.text:= 'Connected'
        else
            edit1.text:= 'Disconnected';
    end;
      

  11.   

    在局域网的公用目录上建一个空的文本文件如cc.txt;
    然后通过
    if FILEEXISTS('\\服务器名\路径\cc.txt')then
      showmessage('网络已联接');
    else
      showmessage('网络未联');土办法,我就是这么用的。
      

  12.   

    if GetSystemMetrics(SM_NETWORK) and $01=$01 then
      Showmessage('计算机已经连在网络上')
    else
      Showmessage('计算机没有连在网络上');
      

  13.   

    cdl371(心灵之路)你试过吗,你的方法根本就不行