我大概搞错了,看看这个: http://www.codetools.com/internet/rasman.aspCRasConnection::m_dwConnectionSpeedResThe connection speed in bits per second for this connection. Please note that this value is always reported as 0 on NT as currently there is no documented way of retrieving this value on NT. Another point to bear in mind is that on 95/98, this is the accumulated connection speed of all current RAS connections. This means that if you are using multilink features or have two separate RAS connections active at the one time, then this value will be the total of both connections.
这篇文章中说的总接收,总发送,每秒接收,每秒发送
这四个数值我都能得到。我想得到的是modem和ISP端的握手速度
比如是26.4K、33.6K或51.2K速度连接。
RasGetConnectionStatistics();
参数RAS_STATS::dwBps 就是了
http://www.codetools.com/internet/rasman.aspCRasConnection::m_dwConnectionSpeedResThe connection speed in bits per second for this connection. Please note that this value is always reported as 0 on NT as currently there is no documented way of retrieving this value on NT. Another point to bear in mind is that on 95/98, this is the accumulated connection speed of all current RAS connections. This means that if you are using multilink features or have two separate RAS connections active at the one time, then this value will be the total of both connections.
#include "ras.h"
RAS_STATS rasstats;
怎么程序报告说error C2065: 'RAS_STATS' : undeclared identifier
可我看MSDN,RAS_STATS的头文件就是Ras.h啊
这是怎么回事呢?
请指点
另外还应该定义winntver为0x500,以使用2000的函数
通过TAPI或RAS能得到modem握手后的速度吗?(这个速度是指初始连结速度,不是
时实的速度)
可惜只能在2000上面用
但是就象我上面说的
在vc里我用这个函数的时候会编译不过去
很奇怪的是我已经include了ras.h
而我打开ras.h的确没有发现RasGetConnectionStatistics()
难道是msdn写错了???
那我去装一个新的SDK就可以了是吗?
LoadLibrary()
GetProcAddress()
需要自己把RAS_STATS的结构声名一下
我大概已经知道该怎么做了
:)