PdceMeasureQueryInfo Function

Action

This function returns an information string for a given measure if the measure provides such a string (for example, the description of NT performance counters).

Include file

Pdce.bdh

Syntax

PdceMeasureQueryInfo( in  hMeasure     : number,                      
                      out sDescription : string,
                      in  uSize        :number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hMeasure Specifies the measure's handle, from the PdceMeasureSubscribe or PdceAddMeasure function.
sDescription Specifies the buffer to receive the measure's description.
uSize Specifies an unsigned integer providing the size of the buffer (optional).

Example

Const  
    STRING_SIZE            := 1024; 
    PERFMON_SAMPLE_MEASURE := "PERFMON:\\Processor(_Total)\\% Processor Time@localhost"; 

dcltrans
    transaction TInit
    var    
      sMeasureKey       : string;    
      sMeasureName      : array[10] of string;    
      sDescription      : string;    
      fPdceInitInterval : float;    
      uiTimeStamp       : number;  
    begin    
      // Insert here the initial statements    
      PdceStartup();    
      PdceClientRegister(pClient, uiPdceInternalQueryInterval);    
      sMeasureKey     := PERFMON_SAMPLE_MEASURE;    
      sMeasureName[1] := "PerfmonMeasure1";    
      PdceAddMeasure(pClient, sMeasureName[1], sMeasureKey, pMeasure[1]);     
      wait(fPdceInitInterval);    
      PdceMeasureQueryInfo(pMeasure[1], sDescription);    
      write(sMeasureName[1]);    
      write(": ");    
      writeln(sDescription);    
      writeln;  
    end TInit;