MCPcopy Create free account
hub / github.com/T-Troll/alienfx-tools / GetValuesArray

Method GetValuesArray

alienfx-mon/SenMonHelper.cpp:107–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107int SenMonHelper::GetValuesArray(HCOUNTER counter) {
108 PDH_STATUS pdhStatus;
109 DWORD count;
110 DWORD cs = counterSize;
111 while ((pdhStatus = PdhGetFormattedCounterArray(counter, PDH_FMT_LONG /*| PDH_FMT_NOSCALE*/, &cs, &count, (PDH_FMT_COUNTERVALUE_ITEM*)counterValues)) == PDH_MORE_DATA) {
112 delete[] counterValues;
113 counterSize = cs;
114 counterValues = new byte[counterSize];
115 cv = (PDH_FMT_COUNTERVALUE_ITEM*)counterValues;
116 }
117
118 if (pdhStatus != ERROR_SUCCESS) {
119 return 0;
120 }
121 return count;
122}
123
124string SenMonHelper::GetFanName(int index) {
125 string fname;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected