PerfOpenQueryHandle function
Creates a handle that references a query on the specified system. A query is a list of counter specifications.
Syntax
ULONG WINAPI PerfOpenQueryHandle( _In_opt_ LPCWSTR szMachine, _Out_ HANDLE hQuery );
Parameters
- szMachine [in, optional]
-
The name of the machine for which you want to get the query handle.
- hQuery [out]
-
The handle to the query. Call PerfCloseQueryHandle to close ths handle when you no longer need it.
Return value
If the function succeeds, it returns ERROR_SUCCESS.
If the function fails, the return value is a system error code.
Remarks
Use PerfAddCounters and PerfDeleteCounters to add or remove counter specifications to the list. Use PerfQueryCounterInfo to get the counter specifications currently in the list and to determine the indexes at which the data for each counter will be returned by PerfQueryCounterData. Use PerfQueryCounterData to retrieve the values of the counters that match the counter specifications.
Requirements
|
Minimum supported client |
Windows 10, version 1607 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2016 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also