public interface Pdh
extends com.sun.jna.platform.win32.Pdh
com.sun.jna.platform.win32.Pdh.PDH_COUNTER_PATH_ELEMENTS, com.sun.jna.platform.win32.Pdh.PDH_RAW_COUNTER, com.sun.jna.platform.win32.Pdh.PDH_TIME_INFO| Modifier and Type | Field and Description |
|---|---|
static Pdh |
INSTANCE |
static int |
PDH_CSTATUS_NO_MACHINE |
static int |
PDH_CSTATUS_NO_OBJECT |
static int |
PDH_INVALID_ARGUMENT |
static int |
PDH_MEMORY_ALLOCATION_FAILURE |
static int |
PDH_MORE_DATA |
PDH_CVERSION_WIN40, PDH_CVERSION_WIN50, PDH_FMT_1000, PDH_FMT_ANSI, PDH_FMT_DOUBLE, PDH_FMT_LARGE, PDH_FMT_LONG, PDH_FMT_NOCAP100, PDH_FMT_NODATA, PDH_FMT_NOSCALE, PDH_FMT_RAW, PDH_FMT_UNICODE, PDH_MAX_COUNTER_NAME, PDH_MAX_COUNTER_PATH, PDH_MAX_DATASOURCE_PATH, PDH_MAX_INSTANCE_NAME, PDH_PATH_WBEM_INPUT, PDH_PATH_WBEM_RESULT, PDH_VERSION, PERF_DETAIL_COSTLY, PERF_DETAIL_STANDARD| Modifier and Type | Method and Description |
|---|---|
int |
PdhEnumObjectItems(String szDataSource,
String szMachineName,
String szObjectName,
com.sun.jna.Pointer mszCounterList,
com.sun.jna.platform.win32.WinDef.DWORDByReference pcchCounterListLength,
com.sun.jna.Pointer mszInstanceList,
com.sun.jna.platform.win32.WinDef.DWORDByReference pcchInstanceListLength,
int dwDetailLevel,
int dwFlags)
Returns the specified object's counter and instance names that exist on
the specified computer or in the specified log file.
|
int |
PdhLookupPerfIndexByName(String szMachineName,
String szNameBuffer,
com.sun.jna.platform.win32.WinDef.DWORDByReference pdwIndex)
Returns the counter index corresponding to the specified counter name.
|
int |
PdhLookupPerfNameByIndex(String szMachineName,
int dwNameIndex,
com.sun.jna.Pointer szNameBuffer,
com.sun.jna.platform.win32.WinDef.DWORDByReference pcchNameBufferSize)
Returns the performance object name or counter name corresponding to the
specified index.
|
PdhAddCounter, PdhAddEnglishCounter, PdhCloseQuery, PdhCollectQueryData, PdhCollectQueryDataEx, PdhCollectQueryDataWithTime, PdhConnectMachine, PdhGetDllVersion, PdhGetRawCounterValue, PdhMakeCounterPath, PdhOpenQuery, PdhRemoveCounter, PdhSetQueryTimeRange, PdhValidatePathstatic final Pdh INSTANCE
static final int PDH_MORE_DATA
static final int PDH_INVALID_ARGUMENT
static final int PDH_MEMORY_ALLOCATION_FAILURE
static final int PDH_CSTATUS_NO_MACHINE
static final int PDH_CSTATUS_NO_OBJECT
int PdhEnumObjectItems(String szDataSource, String szMachineName, String szObjectName, com.sun.jna.Pointer mszCounterList, com.sun.jna.platform.win32.WinDef.DWORDByReference pcchCounterListLength, com.sun.jna.Pointer mszInstanceList, com.sun.jna.platform.win32.WinDef.DWORDByReference pcchInstanceListLength, int dwDetailLevel, int dwFlags)
szDataSource - String that specifies the name of the log file used to
enumerate the counter and instance names. If NULL, the
function uses the computer specified in the szMachineName
parameter to enumerate the names.szMachineName - String that specifies the name of the computer that contains
the counter and instance names that you want to enumerate.
Include the leading slashes in the computer name, for example,
\\computername. If the szDataSource parameter is NULL, you can
set szMachineName to NULL to specify the local computer.szObjectName - String that specifies the name of the object whose counter and
instance names you want to enumerate.mszCounterList - Caller-allocated buffer that receives a list of
null-terminated counter names provided by the specified
object. The list contains unique counter names. The list is
terminated by two NULL characters. Set to NULL if the
pcchCounterListLengthparameter is zero.pcchCounterListLength - Size of the mszCounterList buffer, in TCHARs. If zero on input
and the object exists, the function returns PDH_MORE_DATA and
sets this parameter to the required buffer size. If the buffer
is larger than the required size, the function sets this
parameter to the actual size of the buffer that was used. If
the specified size on input is greater than zero but less than
the required size, you should not rely on the returned size to
reallocate the buffer.mszInstanceList - Caller-allocated buffer that receives a list of
null-terminated instance names provided by the specified
object. The list contains unique instance names. The list is
terminated by two NULL characters. Set to NULL if
pcchInstanceListLength is zero.pcchInstanceListLength - Size of the mszInstanceList buffer, in TCHARs. If zero on
input and the object exists, the function returns
PDH_MORE_DATA and sets this parameter to the required buffer
size. If the buffer is larger than the required size, the
function sets this parameter to the actual size of the buffer
that was used. If the specified size on input is greater than
zero but less than the required size, you should not rely on
the returned size to reallocate the buffer. If the specified
object does not support variable instances, then the returned
value will be zero. If the specified object does support
variable instances, but does not currently have any instances,
then the value returned is 2, which is the size of an empty
MULTI_SZ list string.dwDetailLevel - Detail level of the performance items to return. All items
that are of the specified detail level or less will be
returned.dwFlags - This parameter must be zero.int PdhLookupPerfIndexByName(String szMachineName, String szNameBuffer, com.sun.jna.platform.win32.WinDef.DWORDByReference pdwIndex)
szMachineName - Null-terminated string that specifies the name of the computer
where the specified counter is located. The computer name can
be specified by the DNS name or the IP address. If NULL, the
function uses the local computer.szNameBuffer - Null-terminated string that contains the counter name.pdwIndex - Index of the counter.int PdhLookupPerfNameByIndex(String szMachineName, int dwNameIndex, com.sun.jna.Pointer szNameBuffer, com.sun.jna.platform.win32.WinDef.DWORDByReference pcchNameBufferSize)
szMachineName - Null-terminated string that specifies the name of the computer
where the specified performance object or counter is located.
The computer name can be specified by the DNS name or the IP
address. If NULL, the function uses the local computer.dwNameIndex - Index of the performance object or counter.szNameBuffer - Caller-allocated buffer that receives the null-terminated name
of the performance object or counter. Set to NULL if
pcchNameBufferSize is zero.pcchNameBufferSize - Size of the szNameBuffer buffer, in TCHARs. If zero on input,
the function returns PDH_MORE_DATA and sets this parameter to
the required buffer size. If the buffer is larger than the
required size, the function sets this parameter to the actual
size of the buffer that was used. If the specified size on
input is greater than zero but less than the required size,
you should not rely on the returned size to reallocate the
buffer.Copyright © 2010–2018 oshi. All rights reserved.