找回密码
 加入
搜索
查看: 3980|回复: 3

请教下API GetIfEntry 的用法

[复制链接]
发表于 2009-4-4 20:16:33 | 显示全部楼层 |阅读模式
RT,MSDN搜索了一下,居然没有相关的函数说明,狂晕.
高手来帮下忙.

[ 本帖最后由 ceoguang 于 2009-4-4 21:31 编辑 ]
 楼主| 发表于 2009-4-4 20:36:53 | 显示全部楼层
找到了,不过是VC的,转不过来
http://msdn.microsoft.com/en-us/library/aa365939(VS.85).aspx
高手帮帮忙啊
发表于 2009-4-4 20:46:55 | 显示全部楼层
Const $tagMIB_IFROW = "wchar wszName[256];dword dwIndex;" & _
                                "dword dwType;dword dwMtu;" & _
                                "dword dwSpeed;dword dwPhysAddrLen;" & _
                                "byte PhysAddr[8];dword dwAdminStatus;" & _
                                "dword dwOperStatus;dword dwLastChange;" & _
                                "dword dwInOctets;dword dwInUcastPkts;" & _
                                "dword dwInNUcastPkts;dword dwInDiscards;" & _
                                "dword dwInErrors;dword dwInUnknownProtos;" & _
                                "dword dwOutOctets;dword dwOutUcastPkts;" & _
                                "dword dwOutNUcastPkts;dword dwOutDiscards;" & _
                                "dword dwOutErrors;dword dwOutQLen;" & _
                                "dword dwDescrLen;byte Descr[256]"


$tResult = _GetIfEntry(1)
Msgbox(0, @error, DllStructGetData($tResult, "dwType"))


Func _GetIfEntry($iIndex)
        Local $tMIBIFROW, $iResult

        $tMIBIFROW = DllStructCreate($tagMIB_IFROW)
        DllStructSetData($tMIBIFROW, 2, $iIndex)

        $iResult = DllCall("Iphlpapi.dll", "dword", "GetIfEntry", _
                        "ptr", DllStructGetPtr($tMIBIFROW))
        Return SetError($iResult[0], 0, $tMIBIFROW)
EndFunc        ;==>_GetIfEntry

评分

参与人数 1金钱 +10 收起 理由
ceoguang + 10 感谢

查看全部评分

发表于 2010-9-14 12:41:22 | 显示全部楼层
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-10-3 08:18 , Processed in 0.131070 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表