3.1.4.1.4 PerflibV2OpenQueryHandle (Opnum 3)

The PerflibV2OpenQueryHandle method returns a handle to the client that the client then uses to add, remove, and collect performance counters from the server.

 error_status_t PerflibV2OpenQueryHandle(
   [in, string] wchar_t* szMachine,
   [out] PRPC_HQUERY phQuery
 );

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

phQuery: A handle used by other methods to add, remove, and collect performance counters.

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.

0x0000000E

ERROR_OUTOFMEMORY

The server returns this value to the client if for any reason memory allocation fails as it tries to allocate memory to begin storing state about the client request.

0x000005AA

ERROR_NO_SYSTEM_RESOURCES

The server returns this value if it cannot allocate other system resource to process the client request. This is not specifically memory about the client request or handle.