public interface Pdh
extends com.sun.jna.Library
| Modifier and Type | Interface and Description |
|---|---|
static class |
Pdh.PdhFmtCounterValue
Holds the return value of a formatted data query.
|
static class |
Pdh.ValueUnion
Union included in return value of
Pdh.PdhFmtCounterValue |
| Modifier and Type | Field and Description |
|---|---|
static Pdh |
INSTANCE |
static int |
PDH_FMT_1000 |
static int |
PDH_FMT_DOUBLE |
static int |
PDH_FMT_LARGE |
static int |
PDH_FMT_LONG |
static int |
PDH_FMT_NOCAP100 |
static int |
PDH_FMT_NOSCALE |
| Modifier and Type | Method and Description |
|---|---|
int |
PdhAddEnglishCounterA(com.sun.jna.Pointer pointer,
String counterPath,
com.sun.jna.ptr.IntByReference dwUserData,
com.sun.jna.ptr.PointerByReference phCounter)
Adds the specified language-neutral counter to the query.
|
int |
PdhCloseQuery(com.sun.jna.Pointer pointer)
Closes all counters contained in the specified query, closes all handles
related to the query, and frees all memory associated with the query.
|
int |
PdhCollectQueryData(com.sun.jna.Pointer pointer)
Collects the current raw data value for all counters in the specified
query and updates the status code of each counter.
|
int |
PdhGetFormattedCounterValue(com.sun.jna.Pointer pointer,
int dwFormat,
com.sun.jna.ptr.IntByReference lpdwType,
Pdh.PdhFmtCounterValue pValue)
Computes a displayable value for the specified counter.
|
int |
PdhOpenQuery(String szDataSource,
com.sun.jna.ptr.IntByReference dwUserData,
com.sun.jna.ptr.PointerByReference phQuery)
Creates a new query that is used to manage the collection of performance
data.
|
static final Pdh INSTANCE
static final int PDH_FMT_LONG
static final int PDH_FMT_DOUBLE
static final int PDH_FMT_LARGE
static final int PDH_FMT_NOSCALE
static final int PDH_FMT_1000
static final int PDH_FMT_NOCAP100
int PdhOpenQuery(String szDataSource, com.sun.jna.ptr.IntByReference dwUserData, com.sun.jna.ptr.PointerByReference phQuery)
szDataSource - Null-terminated string that specifies the name of the log file
from which to retrieve performance data. If NULL, performance
data is collected from a real-time data source.dwUserData - User-defined value to associate with this query.phQuery - Handle to the query. You use this handle in subsequent calls.int PdhAddEnglishCounterA(com.sun.jna.Pointer pointer,
String counterPath,
com.sun.jna.ptr.IntByReference dwUserData,
com.sun.jna.ptr.PointerByReference phCounter)
pointer - Handle to the query to which you want to add the counter. This
handle is returned by the
PdhOpenQuery(String, IntByReference, PointerByReference)
function.counterPath - Null-terminated string that contains the counter path.dwUserData - User-defined value.phCounter - Handle to the counter that was added to the query. You may
need to reference this handle in subsequent calls.int PdhCollectQueryData(com.sun.jna.Pointer pointer)
pointer - Handle of the query for which you want to collect data. The
PdhOpenQuery(String, IntByReference, PointerByReference)
function returns this handle.int PdhGetFormattedCounterValue(com.sun.jna.Pointer pointer,
int dwFormat,
com.sun.jna.ptr.IntByReference lpdwType,
Pdh.PdhFmtCounterValue pValue)
pointer - Handle of the counter for which you want to compute a
displayable value. The
PdhAddEnglishCounterA(Pointer, String, IntByReference, PointerByReference)
function returns this handle.dwFormat - Determines the data type of the formatted value.lpdwType - Receives the counter type. This parameter is optional.pValue - A Pdh.PdhFmtCounterValue structure that receives the
counter value.int PdhCloseQuery(com.sun.jna.Pointer pointer)
pointer - Handle to the query to close. This handle is returned by the
PdhOpenQuery(String, IntByReference, PointerByReference)
function.Copyright © 2010–2016 com.github.dblock. All rights reserved.