3.1.4.1.1 PerflibV2EnumerateCounterSet (Opnum 0)

The PerflibV2EnumerateCounterSet method allows a client to enumerate the available countersets on a server.

 error_status_t PerflibV2EnumerateCounterSet(
   [in, string] wchar_t* szMachine,
   [in, range(0, 256)] DWORD dwInSize,
   [out] DWORD* pdwOutSize,
   [out] DWORD* pdwRtnSize,
   [out, size_is(dwInSize), length_is(* pdwOutSize)] 
     GUID* lpData
 );

szMachine: A Unicode string specifying a server name, which is passed directly to the counter provider. Counter providers can ignore the server name provided by szMachine.

dwInSize: The size of the buffer, in number of GUIDs.

pdwOutSize: On output, the number of GUIDs that are returned in the array. The server MUST set this value to zero if the value of dwInSize is less than the total number of GUIDs on the server.

pdwRtnSize: On output, the total number of GUIDs on the server.

lpData: The buffer that returns an array of GUIDs.

Return Values: This method MUST return zero (ERROR_SUCCESS) for success; otherwise, it MUST return one of the standard Windows errors, as specified in [MS-ERREF] section 2.2.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The return value indicates success.

0x00000005

ERROR_ACCESS_DENIED

The server returns this value to the client if the authentication level of the client is less than RPC_C_AUTHN_LEVEL_PKT_PRIVACY.

0x00000008

ERROR_NOT_ENOUGH_MEMORY

This return value is used to indicate when the size of the client-provided buffer is not large enough to accommodate all of the GUID values that are being returned by the server.

0x0000000E

ERROR_OUTOFMEMORY

This return value is used to indicate that the server, while attempting to return all of the appropriate GUIDs to the client, could not allocate memory.