PerfStartProviderEx function

Registers the provider.

Syntax


ULONG PerfStartProviderEx(
  _In_     LPGUID                 ProviderGuid,
  _In_opt_ PPERF_PROVIDER_CONTEXT ProviderContext,
  _Out_    HANDLE                 *phProvider
);

Parameters

ProviderGuid [in]

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

ProviderContext [in, optional]

A PERF_PROVIDER_CONTEXT structure that contains pointers to the control callback, memory management routines, and context information.

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.

The CTRPP tool includes this function instead of PerfStartProvider if you use the -MemoryRoutines argument or -NotificationCallback argument when calling CTRPP, or if the callback attribute of the provider element is set to "custom".

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Perflib.h

Library

Advapi32.lib

DLL

Advapi32.dll

See also

PerfStopProvider

 

 

Show: