source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/perflib.h

Last change on this file was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 3.7 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _INC_PERFLIB
7#define _INC_PERFLIB
8#if (_WIN32_WINNT >= 0x0600)
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#include <apisetcconv.h>
15
16typedef LPVOID (CALLBACK *PERF_MEM_ALLOC)(SIZE_T AllocSize,LPVOID pContext);
17typedef ULONG (WINAPI *PERFLIBREQUEST)(ULONG RequestCode,PVOID Buffer,ULONG BufferSize);
18typedef void (CALLBACK *PERF_MEM_FREE)(LPVOID pBuffer,LPVOID pContext);
19
20typedef struct _PERF_PROVIDER_CONTEXT {
21 DWORD ContextSize;
22 DWORD Reserved;
23 PERFLIBREQUEST ControlCallback;
24 PERF_MEM_ALLOC MemAllocRoutine;
25 PERF_MEM_FREE MemFreeRoutine;
26 LPVOID pMemContext;
27} PERF_PROVIDER_CONTEXT, *PPERF_PROVIDER_CONTEXT;
28
29typedef struct _PERF_COUNTER_IDENTITY {
30 GUID CounterSetGuid;
31 ULONG BufferSize;
32 ULONG CounterId;
33 ULONG InstanceId;
34 ULONG MachineOffset;
35 ULONG NameOffset;
36 ULONG Reserved;
37} PERF_COUNTER_IDENTITY, *PPERF_COUNTER_IDENTITY;
38
39typedef struct _PERF_COUNTER_INFO {
40 ULONG CounterId;
41 ULONG Type;
42 ULONGLONG Attrib;
43 ULONG Size;
44 ULONG DetailLevel;
45 LONG Scale;
46 ULONG Offset;
47} PERF_COUNTER_INFO, *PPERF_COUNTER_INFO;
48
49typedef struct _PERF_COUNTERSET_INFO {
50 GUID CounterSetGuid;
51 GUID ProviderGuid;
52 ULONG NumCounters;
53 ULONG InstanceType;
54} PERF_COUNTERSET_INFO, *PPERF_COUNTERSET_INFO;
55
56typedef struct _PERF_COUNTERSET_INSTANCE {
57 GUID CounterSetGuid;
58 ULONG dwSize;
59 ULONG InstanceId;
60 ULONG InstanceNameOffset;
61 ULONG InstanceNameSize;
62} PERF_COUNTERSET_INSTANCE, *PPERF_COUNTERSET_INSTANCE;
63
64WINADVAPI PPERF_COUNTERSET_INSTANCE WINAPI PerfCreateInstance(
65 HANDLE hProvider,
66 LPCGUID CounterSetGuid,
67 LPCWSTR szInstanceName,
68 ULONG dwInstance
69);
70
71WINADVAPI ULONG WINAPI PerfDecrementULongCounterValue(
72 HANDLE hProvider,
73 PPERF_COUNTERSET_INSTANCE pInstance,
74 ULONG CounterId,
75 ULONG lValue
76);
77
78WINADVAPI ULONG WINAPI PerfDecrementULongLongCounterValue(
79 HANDLE hProvider,
80 PPERF_COUNTERSET_INSTANCE pInstance,
81 ULONG CounterId,
82 ULONGLONG llValue
83);
84
85WINADVAPI ULONG WINAPI PerfDeleteInstance(
86 HANDLE hProvider,
87 PPERF_COUNTERSET_INSTANCE InstanceBlock
88);
89
90WINADVAPI ULONG WINAPI PerfIncrementULongCounterValue(
91 HANDLE hProvider,
92 PPERF_COUNTERSET_INSTANCE pInstance,
93 ULONG CounterId,
94 ULONG lValue
95);
96
97WINADVAPI ULONG WINAPI PerfIncrementULongLongCounterValue(
98 HANDLE hProvider,
99 PPERF_COUNTERSET_INSTANCE pInstance,
100 ULONG CounterId,
101 ULONGLONG llValue
102);
103
104WINADVAPI PPERF_COUNTERSET_INSTANCE WINAPI PerfQueryInstance(
105 HANDLE hProvider,
106 LPCGUID CounterSetGuid,
107 LPCWSTR szInstance,
108 ULONG dwInstance
109);
110
111WINADVAPI ULONG WINAPI PerfSetCounterRefValue(
112 HANDLE hProvider,
113 PPERF_COUNTERSET_INSTANCE pInstance,
114 ULONG CounterId,
115 PVOID lpAddr
116);
117
118WINADVAPI ULONG WINAPI PerfSetCounterSetInfo(
119 HANDLE hProvider,
120 PPERF_COUNTERSET_INFO pTemplate,
121 ULONG dwTemplateSize
122);
123
124WINADVAPI ULONG WINAPI PerfSetULongCounterValue(
125 HANDLE hProvider,
126 PPERF_COUNTERSET_INSTANCE pInstance,
127 ULONG CounterId,
128 ULONG lValue
129);
130
131WINADVAPI ULONG WINAPI PerfSetULongLongCounterValue(
132 HANDLE hProvider,
133 PPERF_COUNTERSET_INSTANCE pInstance,
134 ULONG CounterId,
135 ULONGLONG llValue
136);
137
138WINADVAPI ULONG WINAPI PerfStartProvider(
139 LPGUID ProviderGuid,
140 PERFLIBREQUEST ControlCallback,
141 HANDLE *phProvider
142);
143
144WINADVAPI ULONG WINAPI PerfStartProviderEx(
145 LPGUID ProviderGuid,
146 PPERF_PROVIDER_CONTEXT ProviderContext,
147 HANDLE *phProvider
148);
149
150WINADVAPI ULONG WINAPI PerfStopProvider(
151 HANDLE hProvider
152);
153
154#ifdef __cplusplus
155}
156#endif
157
158#endif /*(_WIN32_WINNT >= 0x0600)*/
159#endif /*_INC_PERFLIB*/
Note: See TracBrowser for help on using the repository browser.