Click to Rate and Give Feedback
MSDN
MSDN Library
Diagnostics
 PerfStartProvider Function
PerfStartProvider Function

Registers the provider. The CTRPP tool generates the code that calls this function. The provider should not call this function directly.

Syntax

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

This call is located in the PerfAutoInitialize function that the CTRPP tool generates on the provider's behalf. The provider should call the PerfAutoInitialize function from its code.

Requirements

Client Requires Windows Vista.
Server Requires Windows Server 2008.
Header

Declared in Perflib.h.

Library

Use Advapi32.lib.

DLL

Requires Advapi32.dll.

See Also

PerfStopProvider


Send comments about this topic to Microsoft

Build date: 7/17/2008

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker