|
| 1 | +// Licensed to Elasticsearch B.V. under one or more contributor |
| 2 | +// license agreements. See the NOTICE file distributed with |
| 3 | +// this work for additional information regarding copyright |
| 4 | +// ownership. Elasticsearch B.V. licenses this file to you under |
| 5 | +// the Apache License, Version 2.0 (the "License"); you may |
| 6 | +// not use this file except in compliance with the License. |
| 7 | +// You may obtain a copy of the License at |
| 8 | +// |
| 9 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +// |
| 11 | +// Unless required by applicable law or agreed to in writing, |
| 12 | +// software distributed under the License is distributed on an |
| 13 | +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +// KIND, either express or implied. See the License for the |
| 15 | +// specific language governing permissions and limitations |
| 16 | +// under the License. |
| 17 | + |
| 18 | +// go run mkpdh_defs.go |
| 19 | +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT |
| 20 | + |
| 21 | +//go:build ignore |
| 22 | + |
| 23 | +package pdh |
| 24 | + |
| 25 | +/* |
| 26 | +#include <pdh.h> |
| 27 | +#include <pdhmsg.h> |
| 28 | +#cgo LDFLAGS: -lpdh |
| 29 | +*/ |
| 30 | +import "C" |
| 31 | + |
| 32 | +type PdhErrno uintptr |
| 33 | + |
| 34 | +// PDH Error Codes |
| 35 | +const ( |
| 36 | + PDH_CSTATUS_VALID_DATA PdhErrno = C.PDH_CSTATUS_VALID_DATA |
| 37 | + PDH_CSTATUS_NEW_DATA PdhErrno = C.PDH_CSTATUS_NEW_DATA |
| 38 | + PDH_CSTATUS_NO_MACHINE PdhErrno = C.PDH_CSTATUS_NO_MACHINE |
| 39 | + PDH_CSTATUS_NO_INSTANCE PdhErrno = C.PDH_CSTATUS_NO_INSTANCE |
| 40 | + PDH_MORE_DATA PdhErrno = C.PDH_MORE_DATA |
| 41 | + PDH_CSTATUS_ITEM_NOT_VALIDATED PdhErrno = C.PDH_CSTATUS_ITEM_NOT_VALIDATED |
| 42 | + PDH_RETRY PdhErrno = C.PDH_RETRY |
| 43 | + PDH_NO_DATA PdhErrno = C.PDH_NO_DATA |
| 44 | + PDH_CALC_NEGATIVE_DENOMINATOR PdhErrno = C.PDH_CALC_NEGATIVE_DENOMINATOR |
| 45 | + PDH_CALC_NEGATIVE_TIMEBASE PdhErrno = C.PDH_CALC_NEGATIVE_TIMEBASE |
| 46 | + PDH_CALC_NEGATIVE_VALUE PdhErrno = C.PDH_CALC_NEGATIVE_VALUE |
| 47 | + PDH_DIALOG_CANCELLED PdhErrno = C.PDH_DIALOG_CANCELLED |
| 48 | + PDH_END_OF_LOG_FILE PdhErrno = C.PDH_END_OF_LOG_FILE |
| 49 | + PDH_ASYNC_QUERY_TIMEOUT PdhErrno = C.PDH_ASYNC_QUERY_TIMEOUT |
| 50 | + PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE PdhErrno = C.PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE |
| 51 | + PDH_CSTATUS_NO_OBJECT PdhErrno = C.PDH_CSTATUS_NO_OBJECT |
| 52 | + PDH_CSTATUS_NO_COUNTER PdhErrno = C.PDH_CSTATUS_NO_COUNTER |
| 53 | + PDH_CSTATUS_INVALID_DATA PdhErrno = C.PDH_CSTATUS_INVALID_DATA |
| 54 | + PDH_MEMORY_ALLOCATION_FAILURE PdhErrno = C.PDH_MEMORY_ALLOCATION_FAILURE |
| 55 | + PDH_INVALID_HANDLE PdhErrno = C.PDH_INVALID_HANDLE |
| 56 | + PDH_INVALID_ARGUMENT PdhErrno = C.PDH_INVALID_ARGUMENT |
| 57 | + PDH_FUNCTION_NOT_FOUND PdhErrno = C.PDH_FUNCTION_NOT_FOUND |
| 58 | + PDH_CSTATUS_NO_COUNTERNAME PdhErrno = C.PDH_CSTATUS_NO_COUNTERNAME |
| 59 | + PDH_CSTATUS_BAD_COUNTERNAME PdhErrno = C.PDH_CSTATUS_BAD_COUNTERNAME |
| 60 | + PDH_INVALID_BUFFER PdhErrno = C.PDH_INVALID_BUFFER |
| 61 | + PDH_INSUFFICIENT_BUFFER PdhErrno = C.PDH_INSUFFICIENT_BUFFER |
| 62 | + PDH_CANNOT_CONNECT_MACHINE PdhErrno = C.PDH_CANNOT_CONNECT_MACHINE |
| 63 | + PDH_INVALID_PATH PdhErrno = C.PDH_INVALID_PATH |
| 64 | + PDH_INVALID_INSTANCE PdhErrno = C.PDH_INVALID_INSTANCE |
| 65 | + PDH_INVALID_DATA PdhErrno = C.PDH_INVALID_DATA |
| 66 | + PDH_NO_DIALOG_DATA PdhErrno = C.PDH_NO_DIALOG_DATA |
| 67 | + PDH_CANNOT_READ_NAME_STRINGS PdhErrno = C.PDH_CANNOT_READ_NAME_STRINGS |
| 68 | + PDH_LOG_FILE_CREATE_ERROR PdhErrno = C.PDH_LOG_FILE_CREATE_ERROR |
| 69 | + PDH_LOG_FILE_OPEN_ERROR PdhErrno = C.PDH_LOG_FILE_OPEN_ERROR |
| 70 | + PDH_LOG_TYPE_NOT_FOUND PdhErrno = C.PDH_LOG_TYPE_NOT_FOUND |
| 71 | + PDH_NO_MORE_DATA PdhErrno = C.PDH_NO_MORE_DATA |
| 72 | + PDH_ENTRY_NOT_IN_LOG_FILE PdhErrno = C.PDH_ENTRY_NOT_IN_LOG_FILE |
| 73 | + PDH_DATA_SOURCE_IS_LOG_FILE PdhErrno = C.PDH_DATA_SOURCE_IS_LOG_FILE |
| 74 | + PDH_DATA_SOURCE_IS_REAL_TIME PdhErrno = C.PDH_DATA_SOURCE_IS_REAL_TIME |
| 75 | + PDH_UNABLE_READ_LOG_HEADER PdhErrno = C.PDH_UNABLE_READ_LOG_HEADER |
| 76 | + PDH_FILE_NOT_FOUND PdhErrno = C.PDH_FILE_NOT_FOUND |
| 77 | + PDH_FILE_ALREADY_EXISTS PdhErrno = C.PDH_FILE_ALREADY_EXISTS |
| 78 | + PDH_NOT_IMPLEMENTED PdhErrno = C.PDH_NOT_IMPLEMENTED |
| 79 | + PDH_STRING_NOT_FOUND PdhErrno = C.PDH_STRING_NOT_FOUND |
| 80 | + PDH_UNABLE_MAP_NAME_FILES PdhErrno = C.PDH_UNABLE_MAP_NAME_FILES |
| 81 | + PDH_UNKNOWN_LOG_FORMAT PdhErrno = C.PDH_UNKNOWN_LOG_FORMAT |
| 82 | + PDH_UNKNOWN_LOGSVC_COMMAND PdhErrno = C.PDH_UNKNOWN_LOGSVC_COMMAND |
| 83 | + PDH_LOGSVC_QUERY_NOT_FOUND PdhErrno = C.PDH_LOGSVC_QUERY_NOT_FOUND |
| 84 | + PDH_LOGSVC_NOT_OPENED PdhErrno = C.PDH_LOGSVC_NOT_OPENED |
| 85 | + PDH_WBEM_ERROR PdhErrno = C.PDH_WBEM_ERROR |
| 86 | + PDH_ACCESS_DENIED PdhErrno = C.PDH_ACCESS_DENIED |
| 87 | + PDH_LOG_FILE_TOO_SMALL PdhErrno = C.PDH_LOG_FILE_TOO_SMALL |
| 88 | + PDH_INVALID_DATASOURCE PdhErrno = C.PDH_INVALID_DATASOURCE |
| 89 | + PDH_INVALID_SQLDB PdhErrno = C.PDH_INVALID_SQLDB |
| 90 | + PDH_NO_COUNTERS PdhErrno = C.PDH_NO_COUNTERS |
| 91 | + PDH_SQL_ALLOC_FAILED PdhErrno = C.PDH_SQL_ALLOC_FAILED |
| 92 | + PDH_SQL_ALLOCCON_FAILED PdhErrno = C.PDH_SQL_ALLOCCON_FAILED |
| 93 | + PDH_SQL_EXEC_DIRECT_FAILED PdhErrno = C.PDH_SQL_EXEC_DIRECT_FAILED |
| 94 | + PDH_SQL_FETCH_FAILED PdhErrno = C.PDH_SQL_FETCH_FAILED |
| 95 | + PDH_SQL_ROWCOUNT_FAILED PdhErrno = C.PDH_SQL_ROWCOUNT_FAILED |
| 96 | + PDH_SQL_MORE_RESULTS_FAILED PdhErrno = C.PDH_SQL_MORE_RESULTS_FAILED |
| 97 | + PDH_SQL_CONNECT_FAILED PdhErrno = C.PDH_SQL_CONNECT_FAILED |
| 98 | + PDH_SQL_BIND_FAILED PdhErrno = C.PDH_SQL_BIND_FAILED |
| 99 | + PDH_CANNOT_CONNECT_WMI_SERVER PdhErrno = C.PDH_CANNOT_CONNECT_WMI_SERVER |
| 100 | + PDH_PLA_COLLECTION_ALREADY_RUNNING PdhErrno = C.PDH_PLA_COLLECTION_ALREADY_RUNNING |
| 101 | + PDH_PLA_ERROR_SCHEDULE_OVERLAP PdhErrno = C.PDH_PLA_ERROR_SCHEDULE_OVERLAP |
| 102 | + PDH_PLA_COLLECTION_NOT_FOUND PdhErrno = C.PDH_PLA_COLLECTION_NOT_FOUND |
| 103 | + PDH_PLA_ERROR_SCHEDULE_ELAPSED PdhErrno = C.PDH_PLA_ERROR_SCHEDULE_ELAPSED |
| 104 | + PDH_PLA_ERROR_NOSTART PdhErrno = C.PDH_PLA_ERROR_NOSTART |
| 105 | + PDH_PLA_ERROR_ALREADY_EXISTS PdhErrno = C.PDH_PLA_ERROR_ALREADY_EXISTS |
| 106 | + PDH_PLA_ERROR_TYPE_MISMATCH PdhErrno = C.PDH_PLA_ERROR_TYPE_MISMATCH |
| 107 | + PDH_PLA_ERROR_FILEPATH PdhErrno = C.PDH_PLA_ERROR_FILEPATH |
| 108 | + PDH_PLA_SERVICE_ERROR PdhErrno = C.PDH_PLA_SERVICE_ERROR |
| 109 | + PDH_PLA_VALIDATION_ERROR PdhErrno = C.PDH_PLA_VALIDATION_ERROR |
| 110 | + PDH_PLA_VALIDATION_WARNING PdhErrno = C.PDH_PLA_VALIDATION_WARNING |
| 111 | + PDH_PLA_ERROR_NAME_TOO_LONG PdhErrno = C.PDH_PLA_ERROR_NAME_TOO_LONG |
| 112 | + PDH_INVALID_SQL_LOG_FORMAT PdhErrno = C.PDH_INVALID_SQL_LOG_FORMAT |
| 113 | + PDH_COUNTER_ALREADY_IN_QUERY PdhErrno = C.PDH_COUNTER_ALREADY_IN_QUERY |
| 114 | + PDH_BINARY_LOG_CORRUPT PdhErrno = C.PDH_BINARY_LOG_CORRUPT |
| 115 | + PDH_LOG_SAMPLE_TOO_SMALL PdhErrno = C.PDH_LOG_SAMPLE_TOO_SMALL |
| 116 | + PDH_OS_LATER_VERSION PdhErrno = C.PDH_OS_LATER_VERSION |
| 117 | + PDH_OS_EARLIER_VERSION PdhErrno = C.PDH_OS_EARLIER_VERSION |
| 118 | + PDH_INCORRECT_APPEND_TIME PdhErrno = C.PDH_INCORRECT_APPEND_TIME |
| 119 | + PDH_UNMATCHED_APPEND_COUNTER PdhErrno = C.PDH_UNMATCHED_APPEND_COUNTER |
| 120 | + PDH_SQL_ALTER_DETAIL_FAILED PdhErrno = C.PDH_SQL_ALTER_DETAIL_FAILED |
| 121 | + PDH_QUERY_PERF_DATA_TIMEOUT PdhErrno = C.PDH_QUERY_PERF_DATA_TIMEOUT |
| 122 | +) |
| 123 | + |
| 124 | +var pdhErrors = map[PdhErrno]struct{}{ |
| 125 | + PDH_CSTATUS_VALID_DATA: struct{}{}, |
| 126 | + PDH_CSTATUS_NEW_DATA: struct{}{}, |
| 127 | + PDH_CSTATUS_NO_MACHINE: struct{}{}, |
| 128 | + PDH_CSTATUS_NO_INSTANCE: struct{}{}, |
| 129 | + PDH_MORE_DATA: struct{}{}, |
| 130 | + PDH_CSTATUS_ITEM_NOT_VALIDATED: struct{}{}, |
| 131 | + PDH_RETRY: struct{}{}, |
| 132 | + PDH_NO_DATA: struct{}{}, |
| 133 | + PDH_CALC_NEGATIVE_DENOMINATOR: struct{}{}, |
| 134 | + PDH_CALC_NEGATIVE_TIMEBASE: struct{}{}, |
| 135 | + PDH_CALC_NEGATIVE_VALUE: struct{}{}, |
| 136 | + PDH_DIALOG_CANCELLED: struct{}{}, |
| 137 | + PDH_END_OF_LOG_FILE: struct{}{}, |
| 138 | + PDH_ASYNC_QUERY_TIMEOUT: struct{}{}, |
| 139 | + PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE: struct{}{}, |
| 140 | + PDH_CSTATUS_NO_OBJECT: struct{}{}, |
| 141 | + PDH_CSTATUS_NO_COUNTER: struct{}{}, |
| 142 | + PDH_CSTATUS_INVALID_DATA: struct{}{}, |
| 143 | + PDH_MEMORY_ALLOCATION_FAILURE: struct{}{}, |
| 144 | + PDH_INVALID_HANDLE: struct{}{}, |
| 145 | + PDH_INVALID_ARGUMENT: struct{}{}, |
| 146 | + PDH_FUNCTION_NOT_FOUND: struct{}{}, |
| 147 | + PDH_CSTATUS_NO_COUNTERNAME: struct{}{}, |
| 148 | + PDH_CSTATUS_BAD_COUNTERNAME: struct{}{}, |
| 149 | + PDH_INVALID_BUFFER: struct{}{}, |
| 150 | + PDH_INSUFFICIENT_BUFFER: struct{}{}, |
| 151 | + PDH_CANNOT_CONNECT_MACHINE: struct{}{}, |
| 152 | + PDH_INVALID_PATH: struct{}{}, |
| 153 | + PDH_INVALID_INSTANCE: struct{}{}, |
| 154 | + PDH_INVALID_DATA: struct{}{}, |
| 155 | + PDH_NO_DIALOG_DATA: struct{}{}, |
| 156 | + PDH_CANNOT_READ_NAME_STRINGS: struct{}{}, |
| 157 | + PDH_LOG_FILE_CREATE_ERROR: struct{}{}, |
| 158 | + PDH_LOG_FILE_OPEN_ERROR: struct{}{}, |
| 159 | + PDH_LOG_TYPE_NOT_FOUND: struct{}{}, |
| 160 | + PDH_NO_MORE_DATA: struct{}{}, |
| 161 | + PDH_ENTRY_NOT_IN_LOG_FILE: struct{}{}, |
| 162 | + PDH_DATA_SOURCE_IS_LOG_FILE: struct{}{}, |
| 163 | + PDH_DATA_SOURCE_IS_REAL_TIME: struct{}{}, |
| 164 | + PDH_UNABLE_READ_LOG_HEADER: struct{}{}, |
| 165 | + PDH_FILE_NOT_FOUND: struct{}{}, |
| 166 | + PDH_FILE_ALREADY_EXISTS: struct{}{}, |
| 167 | + PDH_NOT_IMPLEMENTED: struct{}{}, |
| 168 | + PDH_STRING_NOT_FOUND: struct{}{}, |
| 169 | + PDH_UNABLE_MAP_NAME_FILES: struct{}{}, |
| 170 | + PDH_UNKNOWN_LOG_FORMAT: struct{}{}, |
| 171 | + PDH_UNKNOWN_LOGSVC_COMMAND: struct{}{}, |
| 172 | + PDH_LOGSVC_QUERY_NOT_FOUND: struct{}{}, |
| 173 | + PDH_LOGSVC_NOT_OPENED: struct{}{}, |
| 174 | + PDH_WBEM_ERROR: struct{}{}, |
| 175 | + PDH_ACCESS_DENIED: struct{}{}, |
| 176 | + PDH_LOG_FILE_TOO_SMALL: struct{}{}, |
| 177 | + PDH_INVALID_DATASOURCE: struct{}{}, |
| 178 | + PDH_INVALID_SQLDB: struct{}{}, |
| 179 | + PDH_NO_COUNTERS: struct{}{}, |
| 180 | + PDH_SQL_ALLOC_FAILED: struct{}{}, |
| 181 | + PDH_SQL_ALLOCCON_FAILED: struct{}{}, |
| 182 | + PDH_SQL_EXEC_DIRECT_FAILED: struct{}{}, |
| 183 | + PDH_SQL_FETCH_FAILED: struct{}{}, |
| 184 | + PDH_SQL_ROWCOUNT_FAILED: struct{}{}, |
| 185 | + PDH_SQL_MORE_RESULTS_FAILED: struct{}{}, |
| 186 | + PDH_SQL_CONNECT_FAILED: struct{}{}, |
| 187 | + PDH_SQL_BIND_FAILED: struct{}{}, |
| 188 | + PDH_CANNOT_CONNECT_WMI_SERVER: struct{}{}, |
| 189 | + PDH_PLA_COLLECTION_ALREADY_RUNNING: struct{}{}, |
| 190 | + PDH_PLA_ERROR_SCHEDULE_OVERLAP: struct{}{}, |
| 191 | + PDH_PLA_COLLECTION_NOT_FOUND: struct{}{}, |
| 192 | + PDH_PLA_ERROR_SCHEDULE_ELAPSED: struct{}{}, |
| 193 | + PDH_PLA_ERROR_NOSTART: struct{}{}, |
| 194 | + PDH_PLA_ERROR_ALREADY_EXISTS: struct{}{}, |
| 195 | + PDH_PLA_ERROR_TYPE_MISMATCH: struct{}{}, |
| 196 | + PDH_PLA_ERROR_FILEPATH: struct{}{}, |
| 197 | + PDH_PLA_SERVICE_ERROR: struct{}{}, |
| 198 | + PDH_PLA_VALIDATION_ERROR: struct{}{}, |
| 199 | + PDH_PLA_VALIDATION_WARNING: struct{}{}, |
| 200 | + PDH_PLA_ERROR_NAME_TOO_LONG: struct{}{}, |
| 201 | + PDH_INVALID_SQL_LOG_FORMAT: struct{}{}, |
| 202 | + PDH_COUNTER_ALREADY_IN_QUERY: struct{}{}, |
| 203 | + PDH_BINARY_LOG_CORRUPT: struct{}{}, |
| 204 | + PDH_LOG_SAMPLE_TOO_SMALL: struct{}{}, |
| 205 | + PDH_OS_LATER_VERSION: struct{}{}, |
| 206 | + PDH_OS_EARLIER_VERSION: struct{}{}, |
| 207 | + PDH_INCORRECT_APPEND_TIME: struct{}{}, |
| 208 | + PDH_UNMATCHED_APPEND_COUNTER: struct{}{}, |
| 209 | + PDH_SQL_ALTER_DETAIL_FAILED: struct{}{}, |
| 210 | + PDH_QUERY_PERF_DATA_TIMEOUT: struct{}{}, |
| 211 | +} |
| 212 | + |
| 213 | +type PdhCounterFormat uint32 |
| 214 | + |
| 215 | +// PDH Counter Formats |
| 216 | +const ( |
| 217 | + // PdhFmtDouble returns data as a double-precision floating point real. |
| 218 | + PdhFmtDouble PdhCounterFormat = C.PDH_FMT_DOUBLE |
| 219 | + // PdhFmtLarge returns data as a 64-bit integer. |
| 220 | + PdhFmtLarge PdhCounterFormat = C.PDH_FMT_LARGE |
| 221 | + // PdhFmtLong returns data as a long integer. |
| 222 | + PdhFmtLong PdhCounterFormat = C.PDH_FMT_LONG |
| 223 | + |
| 224 | + // Use bitwise operators to combine these values with the counter type to scale the value. |
| 225 | + |
| 226 | + // Do not apply the counter's default scaling factor. |
| 227 | + PdhFmtNoScale PdhCounterFormat = C.PDH_FMT_NOSCALE |
| 228 | + // Counter values greater than 100 (for example, counter values measuring |
| 229 | + // the processor load on multiprocessor computers) will not be reset to 100. |
| 230 | + // The default behavior is that counter values are capped at a value of 100. |
| 231 | + PdhFmtNoCap100 PdhCounterFormat = C.PDH_FMT_NOCAP100 |
| 232 | + // Multiply the actual value by 1,000. |
| 233 | + PdhFmtMultiply1000 PdhCounterFormat = C.PDH_FMT_1000 |
| 234 | +) |
0 commit comments