pdh: Implement PdhCollectQueryData.

This commit is contained in:
Hans Leidekker 2007-06-25 21:11:02 +02:00 committed by Alexandre Julliard
parent 0718c11ee1
commit 4727bec54c
2 changed files with 26 additions and 1 deletions

View File

@ -12,7 +12,7 @@
@ stub PdhCalculateCounterFromRawValue @ stub PdhCalculateCounterFromRawValue
@ stub PdhCloseLog @ stub PdhCloseLog
@ stdcall PdhCloseQuery(ptr) @ stdcall PdhCloseQuery(ptr)
@ stub PdhCollectQueryData @ stdcall PdhCollectQueryData(ptr)
@ stub PdhCollectQueryDataEx @ stub PdhCollectQueryDataEx
@ stub PdhComputeCounterStatistics @ stub PdhComputeCounterStatistics
@ stub PdhConnectMachineA @ stub PdhConnectMachineA

View File

@ -245,6 +245,31 @@ PDH_STATUS WINAPI PdhCloseQuery( PDH_HQUERY handle )
return ERROR_SUCCESS; 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.@) * PdhOpenQueryA (PDH.@)
*/ */