使用下列函式來取用並提供效能數據。
取用者函式
效能資料協助程式 (PDH) 函式
使用效能資料協助程式 (PDH) 函式來取用 V1 和 V2 效能資料提供者的效能數據。
注意
Windows OneCore 應用程式無法使用 PDH 函式。 如果您要撰寫 Windows OneCore 應用程式,請使用 PerfLib V2 取用者函式。
- CounterPathCallBack
- PdhAddCounter
- PdhAddEnglishCounter
- PdhBindInputDataSource
- PdhBrowseCounters
- PdhBrowseCountersH
- PdhCalculateCounterFromRawValue
- PdhCloseLog
- PdhCloseQuery
- PdhCollectQueryData
- PdhCollectQueryDataEx
- PdhCollectQueryDataWithTime
- PdhComputeCounterStatistics
- PdhConnectMachine
- PdhEnumLogSetNames
- PdhEnumMachines
- PdhEnumMachinesH
- PdhEnumObjectItems
- PdhEnumObjectItemsH
- PdhEnumObjects
- PdhEnumObjectsH
- PdhExpandCounterPath
- PdhExpandWildCardPath
- PdhExpandWildCardPathH
- PdhFormatFromRawValue
- PdhGetCounterInfo
- PdhGetCounterTimeBase
- PdhGetDataSourceTimeRange
- PdhGetDataSourceTimeRangeH
- PdhGetDefaultPerfCounter
- PdhGetDefaultPerfCounterH
- PdhGetDefaultPerfObject
- PdhGetDefaultPerfObjectH
- PdhGetDllVersion
- PdhGetFormattedCounterArray
- PdhGetFormattedCounterValue
- PdhGetLogFileSize
- PdhGetRawCounterArray
- PdhGetRawCounterValue
- PdhIsRealTimeQuery
- PdhLookupPerfIndexByName
- PdhLookupPerfNameByIndex
- PdhMakeCounterPath
- PdhOpenLog
- PdhOpenQuery
- PdhOpenQueryH
- PdhParseCounterPath
- PdhParseInstanceName
- PdhReadRawLogRecord
- PdhRemoveCounter
- PdhSelectDataSource
- PdhSetCounterScaleFactor
- PdhSetDefaultRealTimeDataSource
- PdhSetQueryTimeRange
- PdhUpdateLog
- PdhUpdateLogFileCatalog
- PdhValidatePath
- PdhValidatePathEx
PerfLib V2 取用者函式
如果您無法使用效能資料協助程式 (PDH) 函式,請使用 PerfLib V2 取用者函式,從 V2 效能數據提供者取用效能數據。 撰寫 OneCore 應用程式以收集 V2 計數器集,或當您需要收集具有最少相依性和額外負荷的特定 V2 計數器集時,可能會使用這些函式。
提示
PerfLib V2 取用者函式比效能資料協助程式 (PDH) 函式更難使用,且僅支援從 V2 提供者收集數據。 大部分的應用程式都應該優先使用 PDH 函式。
- PerfAddCounters
- PerfCloseQueryHandle
- PerfDeleteCounters
- PerfEnumerateCounterSet
- PerfEnumerateCounterSetInstances
- PerfOpenQueryHandle
- PerfQueryCounterData
- PerfQueryCounterInfo
- PerfQueryCounterSetRegistrationInfo
提供者函式
PerfLib V2 提供者函式
V2 效能資料提供者 使用下列函式:
- AllocateMemory
- ControlCallback
- CounterCleanup
- CounterInitialize
- FreeMemory
- PerfCreateInstance
- PerfDecrementULongCounterValue
- PerfDecrementULongLongCounterValue
- PerfDeleteInstance
- PerfIncrementULongCounterValue
- PerfIncrementULongLongCounterValue
- PerfQueryInstance
- PerfSetCounterSetInfo
- PerfSetULongCounterValue
- PerfSetULongLongCounterValue
- PerfSetCounterRefValue
- PerfStartProvider
- PerfStartProviderEx
- PerfStopProvider
注意
若要安裝和卸載 V2 提供者,請使用 lodctr 和 unlodctr 工具。 LoadPerfCounterTextStrings 和 UnloadPerfCounterTextStrings 函式無法用來安裝和卸載 V2 提供者。
效能 DLL 函式
V1 效能資料提供者 實作提供下列函式的 DLL:
注意
由於效能和可靠性問題顯著,V1 效能數據提供者已被取代。 雖然您仍然可以使用效能延伸模組 DLL 來提供計數器數據,但建議您改為 建立 V2 提供者。 您也可以將現有的 V1 提供者取代為 V2 提供者。
您可以使用 lodctr 和 unlodctr 工具,或呼叫下列函式來安裝和卸載 V1 提供者: