pdh.h revision ee6bcfc59fe3b0230aad85e2ef63d0402b7719b2
/*
* Performance Data Helper
*
* Copyright 2007 Hans Leidekker
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Sun elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
#ifndef _PDH_H_
#define _PDH_H_
#ifdef __WINESRC__
# include <windef.h>
#else
# include <windows.h>
#endif
#include <winperf.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef LONG PDH_STATUS;
typedef HANDLE PDH_HQUERY;
typedef HANDLE PDH_HCOUNTER;
#define PDH_CVERSION_WIN40 0x0400
#define PDH_CVERSION_WIN50 0x0500
#define PDH_VERSION 0x0503
#define PDH_MAX_SCALE 7
#define PDH_MIN_SCALE (-7)
#define PDH_MAX_COUNTER_NAME 1024
#define PDH_FMT_LONG 0x00000100
#define PDH_FMT_DOUBLE 0x00000200
#define PDH_FMT_LARGE 0x00000400
#define PDH_FMT_NOSCALE 0x00001000
#define PDH_FMT_1000 0x00002000
#define PDH_FMT_NOCAP100 0x00008000
#define DATA_SOURCE_REGISTRY 0x00000001
#define DATA_SOURCE_LOGFILE 0x00000002
#define DATA_SOURCE_WBEM 0x00000004
typedef struct _PDH_FMT_COUNTERVALUE
{
union
{
double doubleValue;
typedef struct _PDH_RAW_COUNTER
{
typedef struct _PDH_COUNTER_PATH_ELEMENTS_A
{
typedef struct _PDH_COUNTER_PATH_ELEMENTS_W
{
typedef struct _PDH_DATA_ITEM_PATH_ELEMENTS_A
{
typedef struct _PDH_DATA_ITEM_PATH_ELEMENTS_W
{
typedef struct _PDH_COUNTER_INFO_A
{
union
{
struct
{
typedef struct _PDH_COUNTER_INFO_W
{
union
{
struct
{
PDH_STATUS WINAPI PdhEnumObjectItemsA(LPCSTR, LPCSTR, LPCSTR, LPSTR, LPDWORD, LPSTR, LPDWORD, DWORD, DWORD);
PDH_STATUS WINAPI PdhEnumObjectItemsW(LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, LPDWORD, LPWSTR, LPDWORD, DWORD, DWORD);
#ifdef __cplusplus
}
#endif
#endif /* _PDH_H_ */