Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obtaining network traffic info
#1
How can I get the information about connection?

Duration

Speed

Activity

Bytes: Sent / Received

I found http://www.autoitscript.com/forum/index ... ntry603542
#2
Use performance counters. Example should be somewhere in Resources -> first topic.

Look for class CPerformanceCounter.
#3
performance counters depend of Network Interface name.

Is there any way to work in any computer?
#4
Look in macro "WMI enum processes IDispatch", something similar.
#5
In Win32_PerfRawData_Tcpip_NetworkInterface:

Is Timestamp_PerfTime the time of connection?

In affirmative case: how convert it to 0:00:00 format?
#6
Don't know, look in MSDN.
#7
Quote:In MSDN

Timestamp_PerfTime

Data type: uint64
Access type: Read-only

High Performance counter timestamp. A value could be obtained by calling the Windows function QueryPerformanceCounter. This property is inherited from Win32_Perf.

How convert it in 0:00:00?
#8
Maybe it is system time as returned by QueryPerformanceCounter. Then use perf instead, as it returns more convenient value, number of microseconds.

If it is network time, use QueryPerformanceFrequency to convert it to microseconds, then divide...


Forum Jump:


Users browsing this thread: 1 Guest(s)