找回密码
 加入
搜索
查看: 1166|回复: 1

高手看下这段代码

[复制链接]
发表于 2009-2-16 15:53:55 | 显示全部楼层 |阅读模式
$tagRasConn = "dword dwSize;hWnd hRasConn;char szEntryName[257];" & _
                "char szDeviceType[17];char szDeviceName[129];" & _
                "char szPhoneBook[261];dword dwSubEntry;int GuidEntry;" & _
                "dword dwFlags;int Luid;int GuidCorrelationId"

$tRasConn = DllStructCreate($tagRasConn)
DllStructSetData($tRasConn, "dwSize", DllStructGetSize($tRasConn))
$ptRasConn = DllStructGetPtr($tRasConn)

$lpCb = DllStructCreate("byte")
DllStructSetData($lpCb, 1, DllStructGetSize($tRasConn))

$pRes = DllStructCreate("ulong")

$res = DllCall("RasAPI32.Dll", "dword", "RasEnumConnections", _
                "ptr", $ptRasConn, _
                "dword*", DllStructGetPtr($lpCb), _
                "dword*", DllStructGetPtr($pRes))

$hRasConn = DllStructGetData($tRasConn, "hRasConn")

$tagRasStats = "dword dwSize;dword dwBytesXmited;dword dwBytesRcved;" & _
        "dword dwFramesXmited;dword dwFramesRcved;dword dwCrcErr;" & _
        "dword dwTimeoutErr;dword dwAlignmentErr;dword dwHardwareOverRunErr;" & _
        "dword dwFramingErr;dword dwBufferOverRunErr;dword dwCompressionRatioIn;" & _
        "dword dwCompressionRatioOut;dword dwBps;dword dwConnectDuration"

$tRasStats = DllStructCreate($tagRasStats)
DllStructSetData($tRasStats, "dwSize", DllStructGetSize($tRasStats))
$ptRasStats = DllStructGetPtr($tRasStats)

$GetStatistics = DllCall("RasAPI32.Dll", "dword", "RasGetConnectionStatistics", _
                "hWnd", $hRasConn, "ptr", $ptRasStats)
msgBox(0, DllStructGetData($tRasConn, "szEntryName"), "Speed:" & DllStructGetData($tRasStats, "dwBps") / 1000000)


怎么显示是0
发表于 2009-2-16 19:35:31 | 显示全部楼层

不会呀

不会呀,呵呵.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-23 22:45 , Processed in 0.285954 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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