Changeset 3b8eb61 in nscp for trunk/include


Ignore:
Timestamp:
05/18/05 22:46:09 (8 years ago)
Author:
Michael Medin <michael@…>
Children:
7da80b5
Parents:
f896cfb
Message:

2005-05-18 MickeM

  • Fixed bug in NSC.ini (section title for Check System was wrong) + Added multitasking for plugins (now two plugins can handle requests simultaniously)
  • Fixed som minor issues here and there
Location:
trunk/include
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/EnumProcess.cpp

    rf22f5a9 r3b8eb61  
    55#include "stdafx.h" 
    66#include "EnumProcess.h" 
    7  
    8  
    9 #ifdef _DEBUG 
    10 #undef THIS_FILE 
    11 static char THIS_FILE[]=__FILE__; 
    12 #define new DEBUG_NEW 
    13 #endif 
    147 
    158////////////////////////////////////////////////////////////////////// 
  • trunk/include/PDHCounter.h

    rf7f536b r3b8eb61  
    5050      PDH_STATUS status; 
    5151      assert(hQuery != NULL); 
    52       assert(hCounter_ == NULL); 
     52      if (hCounter_ != NULL) 
     53        throw PDHException("addToQuery failed (already opened): " + name_); 
    5354      if (listener_) 
    5455        listener_->attach(*this); 
    5556      if ((status = PdhAddCounter(hQuery, name_.c_str(), 0, &hCounter_)) != ERROR_SUCCESS)  
    56         throw PDHException("PdhOpenQuery failed", status); 
     57        throw PDHException("PdhOpenQuery failed: " + name_, status); 
    5758      assert(hCounter_ != NULL); 
    5859    } 
    5960    void remove() { 
    60       assert(hCounter_ != NULL); 
     61      if (hCounter_ == NULL) 
     62        return; 
    6163      PDH_STATUS status; 
    6264      if (listener_) 
     
    6769    } 
    6870    void collect() { 
    69       assert(hCounter_ != NULL); 
     71      if (hCounter_ == NULL) 
     72        return; 
    7073      PDH_STATUS status; 
    7174      if ((status = PdhGetFormattedCounterValue(hCounter_, PDH_FMT_LARGE , NULL, &data_)) != ERROR_SUCCESS) 
Note: See TracChangeset for help on using the changeset viewer.