PerfMonClose Function

Action

Closes a handle to a Windows NT Performance Monitor counter.

Include file

Kernel.bdh

Syntax

PerfMonClose( in hPerf : number ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hPerf Handle to a Performance Monitor counter that was created with PerfMonAdd.

Example

var
  hCounter: array [3] of number; 

dcltrans
  transaction TInit
  begin
    PerfMonAdd(hCounter[1], "localhost", "System",
               "% Total Processor Time");
    PerfMonAdd(hCounter[2], "localhost", "Processor",
               "% Processor Time", "0");
    PerfMonAdd(hCounter[3], "localhost", "Memory",
               "Committed Bytes");
  end TInit; 

transaction TShutdown
  var
    i: number;
  begin
    for i := 1 to 3 do PerfMonClose(hCounter[i]) end;
  end TShutdown;