| 105 | } |
| 106 | |
| 107 | int 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 | |
| 124 | string SenMonHelper::GetFanName(int index) { |
| 125 | string fname; |
nothing calls this directly
no outgoing calls
no test coverage detected