Graphisoft®

GSRootVersion: 1.0

PMAddObject

Windows NT only!

The PMAddObject function adds the specified object to the list of counter objects.

long PMAddObject(
  const char    *name,             // object name
  const char    *help              // additional information
);

 

Parameters

name
Specifies the name of the object.
help
Specifies the additional information displayed in explain section of the Performance Monitor.

Return Values

If the function succeeds, return value is a zero-based index of the object within the object list. You can refer to the added object with the returned index.

If the function fails, return value is -1.

Remarks

Use this function only if counters are not in use.

Call of PMAddObject must be always followed by at least one call of PMAddCounter, in order to add a counter to the new object.

Requirements

    Header: Declared in GSRoot.h
    Import Library: Link with GSRootImp.lib

See Also

Performance Monitor Manager Functions, PMAddCounter, PMDeleteObjects