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 
