visual c++ - how to use Win32_PerfRawData_Tcpip_NetworkInterface class to get the current bandwidth in C++ -
i wanted how use win32_perfrawdata_tcpip_networkinterface class current bandwidth. want know begining. i'm using xp,microsoft visual c++ 2005 express edition.i'm not getting how to.
you may find easier required data using performance counters api directly instead of going through wmi. step step instructions here.
after creating query , adding counters it, call pdhcollectquerydata function retrieve current raw data counters in query.
many counters, such rate counters, require 2 data samples calculate formatted data value. pdh maintains data current sample , collected sample. following procedure describes how collect counter values require 2 samples calculate displayable value.
both apis complex, there no easy way here.
Comments
Post a Comment