Performance Counters Functi ...


PerfStartProvider Function

Registers the provider.

Syntax

C++
ULONG PerfStartProvider(
  __in      LPGUID ProviderGuid,
  __in_opt  PERFLIBREQUEST ControlCallback,
  __out     HANDLE *phProvider
);

Parameters

ProviderGuid [in]

GUID that uniquely identifies the provider. The providerGuid attribute of the provider element specifies the GUID.

ControlCallback [in, optional]

ControlCallback function that PERFLIB calls to notify you of consumer requests, such as a request to add or remove counters from the query. This parameter is set if the callback attribute of the counters element is "custom"; otherwise, NULL.

phProvider [out]

Handle to the provider. You must call PerfStopProvider to release resources associated with the handle.

Return Value

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, the return value is a system error code.

Remarks

The CounterInitialize function calls this function; do not call this function directly.

Windows Vista:  The PerfAutoInitialize function calls this function.

Requirements

Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderPerflib.h
LibraryAdvapi32.lib
DLLAdvapi32.dll

See Also

PerfStopProvider

Send comments about this topic to Microsoft

Build date: 10/15/2009

Tags :


Page view tracker