Freigeben über


perfmon

Apply this attribute to a class to define a performance manager object.

[ perfmon(
      name,
   register
) ]

Parameters

  • name
    The name to associate with the perfmon object, as a string. This is a required argument.

  • register
    Boolean indicating whether this manager object should register its objects with the Windows performance monitoring mechanisms. Default is true.

Requirements

Header

atlperf.h

Project

EXE, DLL

Compiler

/D "_ATL_ATTRIBUTES"

For more information about the meaning of the requirements, see Attribute Requirements.

Remarks

This attribute is used at the class level to classify a class as a performance object manager object by adding CPerfMon as a base class. See Adding an ATL Performance Monitor Object for instructions on using Visual Studio code wizards to add performance monitoring support to your project.

Example

#include <atlperf.h>
[ perfmon( name = "MyPerformanceManagerObject", register = true) ]
class CMyPerfMon
{
};

Requirements

Attribute Context

Applies to

class, struct

Repeatable

No

Required attributes

None

Invalid attributes

None

For more information about the attribute contexts, see Attribute Contexts.

See Also

Concepts

perf_object

perf_counter

COM Attributes

Class Attributes

ATL Samples