求救:packet中的例程testapp在98.me.xp测试通过,但在2k下却不能,执行到PacketGetAdapterNames(AdapterName,&AdapterLength)==FALSE就返回,
何解?

解决方案 »

  1.   

    do you have administrator priveledge?PacketGetAdapterNames will read some info from regedit,so check your regedit.in my computer TestApp runs well.
      

  2.   

    我的就可以执行呀,装个winpcap驱动看看
      

  3.   

    //thus i think  you may change TestApp code 
    //Default open the 0
    lpAdapter = (LPADAPTER) PacketOpenAdapter((LPTSTR) AdapterList[0]);
    this you may change to 1,2...,this because 0 may not be your physical netcard.
      

  4.   

    PacketGetAdapterNames(AdapterName,&AdapterLength)并不需要指定哪张网卡啊
      

  5.   

    98.me,xp无问题,2k就是不行,在不同的机子上试,真的是在那行出错
      

  6.   

    打开NetMeter.exe程序,检查2000下是否网卡显示正确,基本上选择的是类似Device\Packet_{132E....}这块,或者先去下载一个sniffer工具看是否能在2K下抓到包。
    http://www.effetech.com/cn/
      

  7.   

    NetMeter.exe:
    error initializing the capture....
    pacp ....
    open ... erroe!
    另外 我装的是2.3,为什么显示 lib 3.0 ....
      

  8.   

    你是否除了winpcap_2_3.exe还装了别的网卡驱动?
      

  9.   

    应该没有,只记得好象装过winpcap3.0 beta版,但在其它2k机上我是装了2.3,还是错,不可思议
      

  10.   

    packet函数份win2000和9x版本的,好象,你仔细看看
    不顾哦最新的版本不错