Platform SDK: Performance Monitoring |
The PdhLookupPerfNameByIndex function returns the performance object name corresponding to the specified index.
PDH_STATUS PdhLookupPerfNameByIndex( LPCTSTR *szMachineName, DWORD dwNameIndex, LPTSTR szNameBuffer, LPDWORD pcchNameBufferSize );
If the function succeeds, it returns ERROR_SUCCESS.
If the function fails, the return value is a PDH error status defined in PDHMsg.h. The following are possible error values.
Error value | Description |
---|---|
PDH_INSUFFICIENT_BUFFER | The buffer is not large enough to contain any data. |
PDH_INVALID_ARGUMENT | An argument is not correct or is incorrectly formatted. |
Windows NT/2000: Requires Windows 2000.
Header: Declared in Pdh.h.
Library: Use Pdh.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows 2000.