Defines a provider and the counters that it provides.
<xs:complexType name="provider">
<xs:choice
minOccurs="0"
maxOccurs="unbounded"
>
<xs:element name="counterSet"
type="man:counterSet"
>
<xs:key name="uniqueCounterID">
<xs:selector
xpath="./man:counter"
/>
<xs:field
xpath="@id"
/>
</xs:key>
<xs:unique name="uniqueCounterName">
<xs:selector
xpath="./man:counter"
/>
<xs:field
xpath="@name"
/>
</xs:unique>
<xs:keyref name="existBaseID">
<xs:selector
xpath="./man:counter"
/>
<xs:field
xpath="@baseID"
/>
</xs:keyref>
<xs:keyref name="existPerfTimeID">
<xs:selector
xpath="./man:counter"
/>
<xs:field
xpath="@perfTimeID"
/>
</xs:keyref>
<xs:keyref name="existPerfFreqID">
<xs:selector
xpath="./man:counter"
/>
<xs:field
xpath="@perfFreqID"
/>
</xs:keyref>
<xs:keyref name="existMultiCounterID">
<xs:selector
xpath="./man:counter"
/>
<xs:field
xpath="@multiCounterID"
/>
</xs:keyref>
<xs:key name="uniqueStructNames">
<xs:selector
xpath="./man:structs/man:struct"
/>
<xs:field
xpath="@name"
/>
</xs:key>
<xs:keyref name="existCounterName">
<xs:selector
xpath="./man:counter"
/>
<xs:field
xpath="@struct"
/>
</xs:keyref>
</xs:element>
</xs:choice>
<xs:attribute name="symbol"
type="man:CSymbolType"
use="optional"
/>
<xs:attribute name="callback"
use="optional"
default="default"
>
<xs:simpleType>
<xs:restriction
base="xs:string"
>
<xs:enumeration
value="custom"
/>
<xs:enumeration
value="default"
/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="providerGuid"
type="man:GUIDType"
use="required"
/>
<xs:attribute name="applicationIdentity"
type="xs:string"
use="required"
/>
<xs:attribute name="providerType"
use="optional"
default="userMode"
>
<xs:simpleType>
<xs:restriction
base="xs:string"
>
<xs:enumeration
value="userMode"
/>
<xs:enumeration
value="kernelMode"
/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="providerName"
type="xs:string"
use="optional"
default="Counters"
/>
<xs:attribute name="resourceBase"
type="man:UInt32Type"
use="optional"
/>
</xs:complexType>
Child elements
| Element | Type | Description |
|---|---|---|
| counterSet | man:counterSet | Identifies the counter set that contains one or more logically related counters. |
Attributes
<table> <colgroup> <col /> <col /> <col /> </colgroup> <thead> <tr class="header"> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr class="odd"> <td>applicationIdentity</td> <td>xs:string</td> <td>The name of the binary file that contains the localized resource strings, either an .exe or .dll file (do not include the path to the binary). The Lodctr.exe utility uses the path from the optional [path] parameter to search for the binary file. For example, lodctr [/m:manifest [path]]. If you do not include the [path] parameter, Lodctr.exe searches the folder that contains the manifest.</td> </tr> <tr class="even"> <td>callback</td>
<td>This attribute indicates that you want to receive notification when a consumer performs certain actions. If you include this attribute, the CTRPP tool uses the alternate <a href="counterinitialize.md">CounterInitialize</a> function signature, which you use to pass in the name of your function that implements the <a href="/windows/desktop/api/Perflib/nc-perflib-perflibrequest">ControlCallback</a> callback function. As an alternative to specifying this attribute, you can use the -NotificationCallback<a href="ctrpp.md">CTRPP</a> argument. Windows Vista: The only valid value for this attribute is "custom". The <a href="ctrpp.md">CTRPP</a> utility generates the template for a <a href="/windows/desktop/api/Perflib/nc-perflib-perflibrequest">ControlCallback</a> callback function. The template is included in the .c file that CTRPP generated. </td> </tr> <tr class="odd"> <td>providerGuid</td> <td><a href="performance-counters-guidtype-simple-type.md">man:GUIDType</a></td> <td>String GUID that uniquely identifies the provider in the manifest. The GUID must be unique within the manifest. You need to provide a new GUID only when the version of the application changes (if you support side-by-side installations).</td> </tr> <tr class="even"> <td>providerName</td> <td>xs:string</td> <td>The name that is used to create the WMI Win32_PerfRawData class name. If you do not specify a name, "Counters" is used as the name of the class.</td> </tr> <tr class="odd"> <td>providerType</td>
<td>Identifies whether the provider is a user-mode provider, kernel-mode provider, or driver provider. Possible values are as follows. <table> <thead> <tr class="header"> <th>Term</th> <th>Description</th> </tr> </thead> <tbody> <tr class="odd"> <td>userMode</td> <td>Specify this mode for a user-mode component such as an application, a DLL, or a user-mode driver. The typical extensions for user-mode components are .exe or .dll. This is the default.</td> </tr> <tr class="even"> <td>kernel</td> <td>Specify this mode for a kernel-mode component such as a WDM or WDF driver. The typical extension for kernel-mode components is .sys. Windows Vista and Windows Server 2008: This value is not supported until Windows 7 and Windows Server 2008 R2.</td> </tr> </tbody> </table>
</td> </tr> <tr class="even"> <td>resourceBase</td> <td><a href="performance-counters-uint32type-simple-type.md">man:UInt32Type</a></td> <td>Defines the starting resource index value that <a href="ctrpp.md">CTRPP</a> uses to generate the resource identifiers.</td> </tr> <tr class="odd"> <td>symbol</td> <td><a href="performance-counters-csymboltype-simple-type.md">man:CSymbolType</a></td> <td>A symbolic name that identifies the provider. The <a href="ctrpp.md">CTRPP</a> tool creates a HANDLE variable that you can use when calling functions that require a handle to the provider (for example, <a href="/windows/desktop/api/Perflib/nf-perflib-perfsetulongcountervalue">PerfSetULongCounterValue</a>). The symbolic name is the name of the variable. If you include the -prefix argument when calling <a href="ctrpp.md">CTRPP</a>, the prefix string is added to the beginning of the symbolic name.</td> </tr> </tbody> </table>
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows Vista [desktop apps only] |
| Minimum supported server | Windows Server 2008 [desktop apps only] |
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
