<div class="content" name="EvtRpcGetPublisherListForChannel" uuid="fe5a6b1f-db18-4e7c-b680-555338aece0b"><p>The EvtRpcGetPublisherListForChannel (Opnum 23) method is
used by a client to get the list of publishers that write events to a
particular channel.</p><dl>
<dd>
<div><pre> error_status_t EvtRpcGetPublisherListForChannel(
   /* [in] RPC_BINDING_HANDLE binding, {the binding handle will be generated by MIDL} */
   [in] LPCWSTR channelName,
   [in] DWORD flags,
   [out] DWORD* numPublisherIds,
   [out, size_is(,*numPublisherIds), range(0, MAX_RPC_PUBLISHER_COUNT), string] 
     LPWSTR** publisherIds
 );
</pre></div>
</dd></dl><p><b>binding: </b>An RPC binding handle as specified in
section <a href="1285c318-9f8c-4c6a-a963-7999557bf8d8" data-linktype="relative-path">2.2.21</a>.</p><p><b>channelName: </b> A pointer to a string that
contains the name of the channel for which the publisher list is needed.</p><p><b>flags: </b>A 32-bit unsigned integer that MUST be
set to zero when sent and MAY be ignored on receipt.<a id="Appendix_A_Target_47"></a><a aria-label="Product behavior note 47" href="65f22d62-5f0f-4306-85c4-50fb9e77075b#Appendix_A_47" data-linktype="relative-path">&lt;47&gt;</a></p><p><b>numPublisherIds: </b>A pointer to a 32-bit
unsigned integer that contains the number of publishers that are registered and
that can write to the log.</p><p><b>publisherIds: </b>A pointer to an array of strings
that contain <a href="9052d476-63d6-43ec-849e-148b7b345965" data-linktype="relative-path">publisher
names</a>.</p><p><b>Return Values: </b>The method MUST return ERROR_SUCCESS
(0x00000000) on success; otherwise, it MUST return an implementation-specific
nonzero value as specified in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>.</p><p>In response to this request from the client, the server MUST
verify that the <i>channelName</i> parameter specifies a correct channel name.
The server MUST fail the method if the <i>channelName</i> parameter is invalid
with the error ERROR_INVALID_PARAMETER (0x00000057). The server checks if a
channel name is valid by searching the given name in its channel table.</p><p>Next, the server MUST verify that the caller has read access
to the channel 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 <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/326c9de1-4602-4d78-848d-8b4e11e6ed80" data-linktype="relative-path">3.2.3.4.2</a>.
Then, if the client specifies a channel, the server SHOULD read the channel&#39;s
access property (as specified in section <a href="f5ae9a61-6f5e-4751-965e-394349c7d950" data-linktype="relative-path">3.1.4.21</a>) as the security
descriptor string. Next, the server SHOULD be able to perform the read access
check using the Access Check algorithm (as specified in <a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a>
section <a href="../ms-dtyp/4f1bbcbb-814a-4c70-a11e-2a5b8779a6f9" data-linktype="relative-path">2.5.3.2</a>).
</p><p>If the previous checks succeed, the server MUST attempt to
return a list of publishers for the channel specified by the <i>channelName</i>
parameter. In order to do this, the server searches all the publisher entries
in its publisher table. For each publisher, the server checks if the publisher
declares that it will generate events to the given channel. If that is true,
the server adds this publisher to the result parameter <i>publisherIds</i> and
the <i>numPublisherIds</i> (initialized as 0) is increased by 1. The server
SHOULD only fail when not enough memory space can be allocated to copy the
matched publisher names into the <i>publisherIds</i> parameter. In that case,
the server SHOULD return ERROR_OUTOFMEMORY (0x0000000E). The server MUST NOT
update its state.</p><p>The server MUST return a value indicating success or failure
for this operation.</p></div>