Changeset 3b8eb61 in nscp for trunk/include
- Timestamp:
- 05/18/05 22:46:09 (8 years ago)
- Children:
- 7da80b5
- Parents:
- f896cfb
- Location:
- trunk/include
- Files:
-
- 1 added
- 2 edited
-
EnumProcess.cpp (modified) (1 diff)
-
MutexRW.h (added)
-
PDHCounter.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/EnumProcess.cpp
rf22f5a9 r3b8eb61 5 5 #include "stdafx.h" 6 6 #include "EnumProcess.h" 7 8 9 #ifdef _DEBUG10 #undef THIS_FILE11 static char THIS_FILE[]=__FILE__;12 #define new DEBUG_NEW13 #endif14 7 15 8 ////////////////////////////////////////////////////////////////////// -
trunk/include/PDHCounter.h
rf7f536b r3b8eb61 50 50 PDH_STATUS status; 51 51 assert(hQuery != NULL); 52 assert(hCounter_ == NULL); 52 if (hCounter_ != NULL) 53 throw PDHException("addToQuery failed (already opened): " + name_); 53 54 if (listener_) 54 55 listener_->attach(*this); 55 56 if ((status = PdhAddCounter(hQuery, name_.c_str(), 0, &hCounter_)) != ERROR_SUCCESS) 56 throw PDHException("PdhOpenQuery failed ", status);57 throw PDHException("PdhOpenQuery failed: " + name_, status); 57 58 assert(hCounter_ != NULL); 58 59 } 59 60 void remove() { 60 assert(hCounter_ != NULL); 61 if (hCounter_ == NULL) 62 return; 61 63 PDH_STATUS status; 62 64 if (listener_) … … 67 69 } 68 70 void collect() { 69 assert(hCounter_ != NULL); 71 if (hCounter_ == NULL) 72 return; 70 73 PDH_STATUS status; 71 74 if ((status = PdhGetFormattedCounterValue(hCounter_, PDH_FMT_LARGE , NULL, &data_)) != ERROR_SUCCESS)
Note: See TracChangeset
for help on using the changeset viewer.








