include: Import IAccessible2 headers.
[wine.git] / include / perflib.h
blob54ea8ccb6145b2a55f0dbf44c4404323cb6bfd83
1 /*
2 * Copyright (C) 2017 Austin English
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef _PERFLIB_H_
20 #define _PERFLIB_H_
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 typedef LPVOID (CDECL * PERF_MEM_ALLOC)(SIZE_T,LPVOID);
27 typedef void (CDECL * PERF_MEM_FREE)(LPVOID,LPVOID);
28 typedef ULONG (WINAPI * PERFLIBREQUEST)(ULONG,PVOID,ULONG);
30 typedef struct _PERF_COUNTERSET_INFO {
31 GUID CounterSetGuid;
32 GUID ProviderGuid;
33 ULONG NumCounters;
34 ULONG InstanceType;
35 } PERF_COUNTERSET_INFO, * PPERF_COUNTERSET_INFO;
37 /* PERF_COUNTERSET_INFO InstanceType values. */
38 #define PERF_COUNTERSET_FLAG_MULTIPLE 0x00000002
39 #define PERF_COUNTERSET_FLAG_AGGREGATE 0x00000004
40 #define PERF_COUNTERSET_FLAG_HISTORY 0x00000008
41 #define PERF_COUNTERSET_FLAG_INSTANCE 0x00000010
43 #define PERF_COUNTERSET_SINGLE_INSTANCE 0
44 #define PERF_COUNTERSET_MULTI_INSTANCES PERF_COUNTERSET_FLAG_MULTIPLE
45 #define PERF_COUNTERSET_SINGLE_AGGREGATE PERF_COUNTERSET_FLAG_AGGREGATE
46 #define PERF_COUNTERSET_MULTI_AGGREGATE (PERF_COUNTERSET_FLAG_AGGREGATE | PERF_COUNTERSET_FLAG_MULTIPLE)
47 #define PERF_COUNTERSET_SINGLE_AGGREGATE_HISTORY (PERF_COUNTERSET_FLAG_HISTORY | PERF_COUNTERSET_SINGLE_AGGREGATE)
48 #define PERF_COUNTERSET_INSTANCE_AGGREGATE (PERF_COUNTERSET_MULTI_AGGREGATE | PERF_COUNTERSET_FLAG_INSTANCE)
50 typedef struct _PERF_COUNTERSET_INSTANCE {
51 GUID CounterSetGuid;
52 ULONG dwSize;
53 ULONG InstanceId;
54 ULONG InstanceNameOffset;
55 ULONG InstanceNameSize;
56 } PERF_COUNTERSET_INSTANCE, * PPERF_COUNTERSET_INSTANCE;
58 typedef struct _PERF_COUNTER_INFO {
59 ULONG CounterId;
60 ULONG Type;
61 ULONGLONG Attrib;
62 ULONG Size;
63 ULONG DetailLevel;
64 LONG Scale;
65 ULONG Offset;
66 } PERF_COUNTER_INFO, *PPERF_COUNTER_INFO;
68 /* PERF_COUNTER_INFO Attrib flags. */
69 #define PERF_ATTRIB_BY_REFERENCE 0x00000001
70 #define PERF_ATTRIB_NO_DISPLAYABLE 0x00000002
71 #define PERF_ATTRIB_NO_GROUP_SEPARATOR 0x00000004
72 #define PERF_ATTRIB_DISPLAY_AS_REAL 0x00000008
73 #define PERF_ATTRIB_DISPLAY_AS_HEX 0x00000010
75 typedef struct _PROVIDER_CONTEXT {
76 DWORD ContextSize;
77 DWORD Reserved;
78 PERFLIBREQUEST ControlCallback;
79 PERF_MEM_ALLOC MemAllocRoutine;
80 PERF_MEM_FREE MemFreeRoutine;
81 LPVOID pMemContext;
82 } PERF_PROVIDER_CONTEXT, * PPERF_PROVIDER_CONTEXT;
84 PERF_COUNTERSET_INSTANCE WINAPI *PerfCreateInstance(HANDLE, const GUID *, const WCHAR *, ULONG);
85 ULONG WINAPI PerfDeleteInstance(HANDLE, PERF_COUNTERSET_INSTANCE *);
86 ULONG WINAPI PerfSetCounterRefValue(HANDLE, PERF_COUNTERSET_INSTANCE *, ULONG, void *);
87 ULONG WINAPI PerfSetCounterSetInfo(HANDLE, PERF_COUNTERSET_INFO *, ULONG);
88 ULONG WINAPI PerfStartProvider(GUID *, PERFLIBREQUEST, HANDLE *);
89 ULONG WINAPI PerfStartProviderEx(GUID *, PERF_PROVIDER_CONTEXT *, HANDLE *);
90 ULONG WINAPI PerfStopProvider(HANDLE);
92 #ifdef __cplusplus
93 } /* extern "C" */
94 #endif
96 #endif /* _PERFLIB_H_ */