Page 1 of 1

Posted: Fri Apr 04, 2003 5:45 pm
by BackupUser
Restored from previous forum. Originally posted by Manne.

I tried to use RasGetConnectionStatistics_() but get always the errormesssage "not a function, an array or a linked list".

Code: Select all

Structure RASCONN 
   dwSize.l 
   hRasConn.l 
   szEntryName.b[256] 
   szDeviceType.b[16] 
   szDeviceName.b[128] 
   pad.b 
EndStructure 

Structure RAS_STATS 
   dwSize.l 
   dwBytesXmited.l 
   dwBytesRcved.l 
   dwFramesXmited.l 
   dwFramesRcved.l 
   dwCrcErr.l 
   dwTimeoutErr.l 
   dwAlignmentErr.l 
   dwHardwareOverrunErr.l 
   dwFramingErr.l 
   dwBufferOverrunErr.l 
   dwCompressionRatioIn.l 
   dwCompressionRatioOut.l 
   dwBps.l 
   dwConnectDuration.l 
EndStructure 

DefType.l y, z 
conn.RASCONN 
stat.RAS_STATS 

conn\dwSize = SizeOf(RASCONN) 
y = conn\dwSize 

If RasEnumConnections_(@conn, @y, @z) = 0 
    stat\dwSize = SizeOf(RAS_STATS) 
    
    If RasGetConnectionStatistics_(@conn, @stat) = 0 
           Debug stat\dwAlignmentErr 
           Debug stat\dwBps 
           Debug stat\dwBufferOverrunErr 
           Debug stat\dwBytesRcved 
           Debug stat\dwBytesXmited 
           Debug stat\dwCompressionRatioIn 
           Debug stat\dwCompressionRatioOut 
           Debug stat\dwConnectDuration 
           Debug stat\dwCrcErr 
           Debug stat\dwFramesRcved 
           Debug stat\dwFramesXmited 
           Debug stat\dwFramingErr 
           Debug stat\dwTimeoutErr 
  EndIf 
EndIf 
Manne

Posted: Fri Apr 04, 2003 6:09 pm
by BackupUser
Restored from previous forum. Originally posted by Bodind.

The right function is: "RasGetConnectStatus_" i think.

Dominique

Posted: Fri Apr 04, 2003 9:21 pm
by BackupUser
Restored from previous forum. Originally posted by ebs.

According to API-Guide 3.7, "RasGetConnectionStatistics_()" is correct. It is in the "rasapi32" DLL. Does PureBasic have these functions defined?

Eric
Originally posted by Bodind

The right function is: "RasGetConnectStatus_" i think.

Dominique

Posted: Fri Apr 04, 2003 10:17 pm
by BackupUser
Restored from previous forum. Originally posted by Bodind.

Yes, i confirm.
Did you see too that: "Requires Windows 2000 or later; Win9x/ME: Not supported" ?

Dominique

Posted: Fri Apr 04, 2003 11:28 pm
by BackupUser
Restored from previous forum. Originally posted by Manne.

I use WIN XP SP1.
For sure thats not the problem, i think this function is in PB either not declared or not under RasGetConnectionStatistics_().

Manne