I want to retreive the amount of BYTES being trasmitted by a RAS connection. All I want to do is call a sub to say to me :
56,000,434 bytes received
1,000,000 bytes sent
Is this going to be an API call ? I assumed so, but wasn't sure how to do it. If you know, please help me in any way that you can. the more detailed information, the better, because I am not very fluent at calling API's.
Sweet AutoBot, that is 150% exactly what I was looking for.
Although, I did think of something else just now - do you know to to check and see if there is conncetion at all ? I mean like, display if any RAS is currently connected, or if your connction status is null, you know.
Anyways, you helped me a lot. Hey Autobot ....
I see you use XP RC2. I have written a little app and package (not much but contanis useful information and apps). Check it out. You can download it from:
Just click "Windows Page" from the top left, and then select XP.EXE - Its a self extracting zip. I cant attach it, its a little over 1 meg... Let me know what you think - pass it around, its kewl.
'Example created by ÅutoBot ([email protected])
Private Declare Function RasEnumConnections Lib "rasapi32" Alias "RasEnumConnectionsA" (ByVal lprasconn As Long, ByVal lpcb As Long, ByVal lpcConnections As Long) As Long
Private Declare Function RasGetConnectionStatistics Lib "rasapi32" (ByVal hRasConn As Long, ByVal lpStatistics As Long) As Long
Private Type RASCONN
dwSize As Long
hRasConn As Long
szEntryName(0 To 256) As Byte
szDeviceType(0 To 16) As Byte
szDeviceName(0 To 128) As Byte
pad As Byte
End Type
Private Type RAS_STATS
dwSize As Long
dwBytesXmited As Long
dwBytesRcved As Long
dwFramesXmited As Long
dwFramesRcved As Long
dwCrcErr As Long
dwTimeoutErr As Long
dwAlignmentErr As Long
dwHardwareOverrunErr As Long
dwFramingErr As Long
dwBufferOverrunErr As Long
dwCompressionRatioIn As Long
dwCompressionRatioOut As Long
dwBps As Long
dwConnectDuration As Long
End Type
Private Sub Command1_Click()
Dim conn As RASCONN
Dim stat As RAS_STATS
Dim y As Long, z As Long
conn.dwSize = Len(conn)
y = conn.dwSize
If RasEnumConnections(VarPtr(conn), VarPtr(y), VarPtr(z)) = 0 Then
stat.dwSize = Len(stat)
If RasGetConnectionStatistics(conn.hRasConn, VarPtr(stat)) = 0 Then
Yeah, believe it or not, I actually saw that on another one of your posts - But I am glad you were nice enough to re-post it instead of yelling at me :-) Hehe, anyway, check out the XPHACKPAK man, let me know what you think. I know its lamo, but hey, it really does have some kewl stuff in it - I promise. Check it out.
The information you gave me helped create the "SMART MODE" of this program. BZAS is an "auto surf" with a whole buncha options. The SMART MODE looks at internet connection, compares, and decides what to do (Stay IDLE, start surfing, halt because of no connection, etc...) Many option to set, cool app.
Try it our man. (No I didnt expect anybody to actually register this app, I just wanted to see a c r a k for it on the internet :-) hehe )