Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

PdhLookupPerfIndexByName function

Returns the counter index corresponding to the specified counter name.

Syntax


PDH_STATUS PdhLookupPerfIndexByName(
  _In_   LPCTSTR szMachineName,
  _In_   LPCTSTR szNameBuffer,
  _Out_  LPDWORD pdwIndex
);

Parameters

szMachineName [in]

Null-terminated string that specifies the name of the computer where the specified counter is located. The computer name can be specified by the DNS name or the IP address. If NULL, the function uses the local computer.

szNameBuffer [in]

Null-terminated string that contains the counter name.

pdwIndex [out]

Index of the counter.

Return value

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, the return value is a system error code or a PDH error code. The following is a possible value.

Return codeDescription
PDH_INVALID_ARGUMENT

A parameter is not valid or is incorrectly formatted.

 

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Pdh.h

Library

Pdh.lib

DLL

Pdh.dll

Unicode and ANSI names

PdhLookupPerfIndexByNameW (Unicode) and PdhLookupPerfIndexByNameA (ANSI)

See also

PdhLookupPerfNameByIndex

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.