1 // Copyright © 2016, Klavs Madsen
2 // Licensed under the MIT License <LICENSE.md>
3 //! Common Performance Data Helper definitions
4 pub const PDH_FMT_RAW
: ::DWORD
= 0x00000010;
5 pub const PDH_FMT_ANSI
: ::DWORD
= 0x00000020;
6 pub const PDH_FMT_UNICODE
: ::DWORD
= 0x00000040;
7 pub const PDH_FMT_LONG
: ::DWORD
= 0x00000100;
8 pub const PDH_FMT_DOUBLE
: ::DWORD
= 0x00000200;
9 pub const PDH_FMT_LARGE
: ::DWORD
= 0x00000400;
10 pub const PDH_FMT_NOSCALE
: ::DWORD
= 0x00001000;
11 pub const PDH_FMT_1000
: ::DWORD
= 0x00002000;
12 pub const PDH_FMT_NODATA
: ::DWORD
= 0x00004000;
13 pub const PDH_FMT_NOCAP100
: ::DWORD
= 0x00008000;
14 pub const PERF_DETAIL_COSTLY
: ::DWORD
= 0x00010000;
15 pub const PERF_DETAIL_STANDARD
: ::DWORD
= 0x0000FFFF;
17 pub type PDH_STATUS
= ::LONG
;
18 pub type PDH_HQUERY
= ::HANDLE
;
19 pub type HQUERY
= PDH_HQUERY
;
20 pub type PDH_HCOUNTER
= ::HANDLE
;
21 pub type HCOUNTER
= PDH_HCOUNTER
;
23 STRUCT
!{struct PDH_FMT_COUNTERVALUE
{
25 largeValue
: ::LONGLONG
,
27 UNION
!(PDH_FMT_COUNTERVALUE
, largeValue
, largeValue
, largeValue_mut
, ::LONGLONG
);
28 UNION
!(PDH_FMT_COUNTERVALUE
, largeValue
, longValue
, longValue_mut
, ::LONG
);
29 UNION
!(PDH_FMT_COUNTERVALUE
, largeValue
, doubleValue
, doubleValue_mut
, ::DOUBLE
);
30 UNION
!(PDH_FMT_COUNTERVALUE
, largeValue
, AnsiStringValue
, AnsiStringValue_mut
, ::LPCSTR
);
31 UNION
!(PDH_FMT_COUNTERVALUE
, largeValue
, WideStringValue
, WideStringValue_mut
, ::LPCWSTR
);
32 pub type PPDH_FMT_COUNTERVALUE
= *mut PDH_FMT_COUNTERVALUE
;
34 STRUCT
!{struct PDH_COUNTER_PATH_ELEMENTS_A
{
35 szMachineName
: ::LPSTR
,
36 szObjectName
: ::LPSTR
,
37 szInstanceName
: ::LPSTR
,
38 szParentInstance
: ::LPSTR
,
39 dwInstanceIndex
: ::DWORD
,
40 szCounterName
: ::LPSTR
,
42 pub type PPDH_COUNTER_PATH_ELEMENTS_A
= *mut PDH_COUNTER_PATH_ELEMENTS_A
;
44 STRUCT
!{struct PDH_COUNTER_PATH_ELEMENTS_W
{
45 szMachineName
: ::LPWSTR
,
46 szObjectName
: ::LPWSTR
,
47 szInstanceName
: ::LPWSTR
,
48 szParentInstance
: ::LPWSTR
,
49 dwInstanceIndex
: ::DWORD
,
50 szCounterName
: ::LPWSTR
,
52 pub type PPDH_COUNTER_PATH_ELEMENTS_W
= *mut PDH_COUNTER_PATH_ELEMENTS_W
;