pdh: Implement PdhCollectQueryData.
This commit is contained in:
parent
0718c11ee1
commit
4727bec54c
|
@ -12,7 +12,7 @@
|
|||
@ stub PdhCalculateCounterFromRawValue
|
||||
@ stub PdhCloseLog
|
||||
@ stdcall PdhCloseQuery(ptr)
|
||||
@ stub PdhCollectQueryData
|
||||
@ stdcall PdhCollectQueryData(ptr)
|
||||
@ stub PdhCollectQueryDataEx
|
||||
@ stub PdhComputeCounterStatistics
|
||||
@ stub PdhConnectMachineA
|
||||
|
|
|
@ -245,6 +245,31 @@ PDH_STATUS WINAPI PdhCloseQuery( PDH_HQUERY handle )
|
|||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* PdhCollectQueryData (PDH.@)
|
||||
*/
|
||||
PDH_STATUS WINAPI PdhCollectQueryData( PDH_HQUERY handle )
|
||||
{
|
||||
struct query *query = handle;
|
||||
struct list *item;
|
||||
|
||||
TRACE("%p\n", handle);
|
||||
|
||||
if (!query || (query->magic != PDH_MAGIC_QUERY)) return PDH_INVALID_HANDLE;
|
||||
|
||||
LIST_FOR_EACH( item, &query->counters )
|
||||
{
|
||||
SYSTEMTIME time;
|
||||
struct counter *counter = LIST_ENTRY( item, struct counter, entry );
|
||||
|
||||
counter->collect( counter );
|
||||
|
||||
GetLocalTime( &time );
|
||||
SystemTimeToFileTime( &time, &counter->stamp );
|
||||
}
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* PdhOpenQueryA (PDH.@)
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue