3.1.4.20 EvtRpcGetChannelList (Opnum 19)

The EvtRpcGetChannelList (Opnum 19) method is used to enumerate the set of available channels.

 error_status_t EvtRpcGetChannelList(
   /* [in] RPC_BINDING_HANDLE binding, {the binding handle will be generated by MIDL} */
   [in] DWORD flags,
   [out] DWORD* numChannelPaths,
   [out, size_is(,*numChannelPaths), range(0, MAX_RPC_CHANNEL_COUNT), string] 
     LPWSTR** channelPaths
 );

binding: An RPC binding handle as specified in section 2.2.21.

flags: A 32-bit unsigned integer that MUST be set to zero when sent and MAY be ignored on receipt.<37>

numChannelPaths:  A pointer to a 32-bit unsigned integer that contains the number of channel names.

channelPaths: A pointer to an array of strings that contain all the channel names.

Return Values:  The method MUST return ERROR_SUCCESS (0x00000000) on success; otherwise, it MUST return an implementation-specific nonzero value as specified in [MS-ERREF].

In response to this request from the client, the server MUST verify that the caller has read access to the channel list and MUST fail the method with the error ERROR_ACCESS_DENIED (0x00000005) if the caller does not have read access. To perform the access check, the server SHOULD first determine the identity of the caller. Information determining the identity of the caller for the purpose of performing an access check is specified in [MS-RPCE] section 3.2.3.4.2. Then, if the client specifies a channel, the server SHOULD read the channel's access property (as specified in section 3.1.4.21) as the security descriptor string. Next, the server SHOULD be able to perform the write and clear access check using the Access Check algorithm (as specified in [MS-DTYP] section 2.5.3.2).

If the above check succeeds, the server MUST return a list of channel name strings. The server SHOULD enumerate all the channels in its channel table (section 3.1.1.5) and read out the channel name strings as the result for the out parameter channelPaths. Meanwhile, the value pointed to by numChannelPaths SHOULD be set to the number of channel name strings in the server channel table. The server SHOULD only fail the method due to shortage of memory in which case the server SHOULD return ERROR_OUTOFMEMORY (0x0000000E). The server MUST NOT update its state.

The server MUST return a value indicating success or failure for this operation.