<div class="content"><p> </p><p>The EvtRpcGetPublisherResourceMetadata (Opnum 25) method
obtains information from the publisher metadata.</p><dl>
<dd>
<div><pre> error_status_t EvtRpcGetPublisherResourceMetadata(
   [in, context_handle] PCONTEXT_HANDLE_PUBLISHER_METADATA handle,
   [in] DWORD propertyId,
   [in] DWORD flags,
   [out] EvtRpcVariantList* pubMetadataProps
 );
</pre></div>
</dd></dl><p><b>handle: </b>A handle to an <span><a href="fda52b23-608b-444e-a979-6b62a00e8f48#gt_bb3fad7e-60bf-46d4-9c3f-7caea47a743e" data-linktype="relative-path">event log</a></span>.
This handle is returned by the EvtRpcGetPublisherMetadata (Opnum 24) method.
This parameter is an <span><a href="fda52b23-608b-444e-a979-6b62a00e8f48#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> context handle,
as specified in <span><a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a></span>, Context
Handles.</p><p><b>propertyId: </b>Type of information as specified
in the following table.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000004</p>
  </td>
  <td>
  <p>Publisher help link.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000005</p>
  </td>
  <td>
  <p>Publisher friendly name.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x0000000C</p>
  </td>
  <td>
  <p>Level information.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000010</p>
  </td>
  <td>
  <p>Task information.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000015</p>
  </td>
  <td>
  <p>Opcode information.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000019</p>
  </td>
  <td>
  <p>Keyword information.</p>
  </td>
 </tr></tbody></table>
</dd></dl><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_50"></a><a aria-label="Product behavior note 50" href="65f22d62-5f0f-4306-85c4-50fb9e77075b#Appendix_A_50" data-linktype="relative-path">&lt;50&gt;</a></p><p><b>pubMetadataProps: </b>Pointer to an <span><a href="14ba9fda-3402-44b2-b1cd-5318a6613a7f" data-linktype="relative-path">EvtRpcVariantList (section 2.2.9)</a></span>
structure. This list MUST contain multiple entries. </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 <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>.</p><p>In response to this request from the client, the server MUST
first validate the handle. The server SHOULD save the context handle value that
it creates in the <b>EvtRpcGetPublisherMetadata</b> method (as specified in
section <span><a href="0011377c-12f8-4440-8629-568b1ec5bcf2" data-linktype="relative-path">3.1.4.25</a></span>) in its
handle table and compare it with the handle passed here to perform that check.<a id="Appendix_A_Target_51"></a><a aria-label="Product behavior note 51" href="65f22d62-5f0f-4306-85c4-50fb9e77075b#Appendix_A_51" data-linktype="relative-path">&lt;51&gt;</a> The server MUST return
ERROR_INVALID_PARAMETER (0x00000057) if the handle is invalid.</p><p>The server MUST return an error if <i>propertyID</i> is
anything other than 0x00000004, 0x00000005, 0x0000000C, 0x00000010, 0x00000015,
or 0x00000019.</p><p>If all the above checks succeed, the server MUST attempt to
return a list of properties for the publisher specified by the handle. If the
publisher does not have metadata, this method SHOULD fail with the error
ERROR_INVALID_DATA (0x0000000D).<a id="Appendix_A_Target_52"></a><a aria-label="Product behavior note 52" href="65f22d62-5f0f-4306-85c4-50fb9e77075b#Appendix_A_52" data-linktype="relative-path">&lt;52&gt;</a> Note that
any one publisher that does have metadata can optionally specify only a subset
of the metadata described herein. For example, not all publishers with metadata
specify help links or keywords. For those cases, the server MUST return
ERROR_SUCCESS (0x00000000) along with a complete EvtRpcVariantList having the
corresponding entries set to EvtVarTypeNull.<a id="Appendix_A_Target_53"></a><a aria-label="Product behavior note 53" href="65f22d62-5f0f-4306-85c4-50fb9e77075b#Appendix_A_53" data-linktype="relative-path">&lt;53&gt;</a></p><p>The EvtRpcVariantList (for more information, see section
2.2.9) MUST contain 29 <span><a href="9c6673b7-4bf2-42b0-9ab7-242d45ead8ff" data-linktype="relative-path">EvtRpcVariants</a></span>
whenever this function returns success. As indicated below, not all of those
EvtRpcVariant entries are used, and all unused entries MUST be set to
EvtVarTypeNull.</p><p>The set of entries used depends on the value specified by
the <i>propertyID</i> parameter. For the sake of brevity, the unused entries
are not shown. </p><p><b>Note</b>  The indexes referenced below are
0-based; for example, index 4 refers to the fifth variant that is returned in
the EvtRpcVariantList.</p><p>When <i>propertyID</i> = 0x00000004, the following entries
MUST be set in <i>pubMetadataProps</i>.</p><p>To do this, the server SHOULD get the helperlink string from
the publisher resource file (as specified in section <span><a href="df904dfb-00f8-4457-abe0-d7907c64dc71" data-linktype="relative-path">3.1.1.14</a></span>).</p><table><thead>
  <tr>
   <th>
   <p>Index</p>
   </th>
   <th>
   <p>Type</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>4</p>
  </td>
  <td>
  <p>EvtVarTypeString</p>
  </td>
  <td>
  <p>HelpLink</p>
  </td>
 </tr></tbody></table><p>When <i>propertyID</i> = 0x00000005, the following entries
MUST be set in <i>pubMetadataProps</i>.</p><p>To do this, the server gets the <i>messageId</i> of the
publisher name from the resource file (as specified in the section 3.1.1.14).</p><table><thead>
  <tr>
   <th>
   <p>Index</p>
   </th>
   <th>
   <p>Type</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>5</p>
  </td>
  <td>
  <p>EvtVarTypeUInt32</p>
  </td>
  <td>
  <p>PublisherMessageID</p>
  </td>
 </tr></tbody></table><p>When <i>propertyID</i> = 0x0000000C, the following entries
MUST be set in <i>pubMetadataProps</i>.</p><p>To do this, the server SHOULD get all the levels&#39; names,
values, and <i>messageId</i> and pack them into the array from the publisher
resource file (as specified in the section 3.1.1.14).</p><table><thead>
  <tr>
   <th>
   <p>Index</p>
   </th>
   <th>
   <p>Type</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>13</p>
  </td>
  <td>
  <p>EvtVarTypeStringArray</p>
  </td>
  <td>
  <p>LevelName</p>
  </td>
 </tr><tr>
  <td>
  <p>14</p>
  </td>
  <td>
  <p>EvtVarTypeUInt32Array</p>
  </td>
  <td>
  <p>LevelValue</p>
  </td>
 </tr><tr>
  <td>
  <p>15</p>
  </td>
  <td>
  <p>EvtVarTypeUInt32Array</p>
  </td>
  <td>
  <p>LevelMessageID</p>
  </td>
 </tr></tbody></table><p>When <i>propertyID</i> = 0x00000010, the following entries
MUST be set in <i>pubMetadataProps</i>.</p><p>To do this, the server SHOULD get all the tasks&#39; names,
values, and <i>messageId</i>s and pack them into the array from the publisher
resource file (as specified in the section 3.1.1.14).</p><table><thead>
  <tr>
   <th>
   <p>Index</p>
   </th>
   <th>
   <p>Type</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>17</p>
  </td>
  <td>
  <p>EvtVarTypeStringArray</p>
  </td>
  <td>
  <p>TaskName</p>
  </td>
 </tr><tr>
  <td>
  <p>18</p>
  </td>
  <td>
  <p>EvtVarTypeGuidArray</p>
  </td>
  <td>
  <p>TaskEventGuid</p>
  </td>
 </tr><tr>
  <td>
  <p>19</p>
  </td>
  <td>
  <p>EvtVarTypeUInt32Array</p>
  </td>
  <td>
  <p>TaskValue</p>
  </td>
 </tr><tr>
  <td>
  <p>20</p>
  </td>
  <td>
  <p>EvtVarTypeUInt32Array</p>
  </td>
  <td>
  <p>TaskMessageID</p>
  </td>
 </tr></tbody></table><p>When <i>propertyID</i> = 0x00000015, the following entries
MUST be set in <i>pubMetadataProps</i>.</p><p>To do this, the server SHOULD get all the Opcodes&#39; names,
values, and <i>messageId</i>s and pack them into the array from the publisher
resource file (as specified in the section 3.1.1.14).</p><table><thead>
  <tr>
   <th>
   <p>Index</p>
   </th>
   <th>
   <p>Type</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>22</p>
  </td>
  <td>
  <p>EvtVarTypeStringArray</p>
  </td>
  <td>
  <p>OpcodeName</p>
  </td>
 </tr><tr>
  <td>
  <p>23</p>
  </td>
  <td>
  <p>EvtVarTypeUInt32Array</p>
  </td>
  <td>
  <p>OpcodeValue</p>
  </td>
 </tr><tr>
  <td>
  <p>24</p>
  </td>
  <td>
  <p>EvtVarTypeUInt32Array</p>
  </td>
  <td>
  <p>OpcodeMessageID</p>
  </td>
 </tr></tbody></table><p>When <i>propertyID</i> = 0x00000019, the following entries
MUST be set in <i>pubMetadataProps</i>.</p><p>To do this, the server SHOULD get all the Keywords&#39; names,
values, and <i>messageId</i>s and pack them into the array from the publisher
resource file (as specified in the section 3.1.1.14).</p><table><thead>
  <tr>
   <th>
   <p>Index</p>
   </th>
   <th>
   <p>Type</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>26</p>
  </td>
  <td>
  <p>EvtVarTypeStringArray</p>
  </td>
  <td>
  <p>KeywordName</p>
  </td>
 </tr><tr>
  <td>
  <p>27</p>
  </td>
  <td>
  <p>EvtVarTypeUInt64Array</p>
  </td>
  <td>
  <p>KeywordValue</p>
  </td>
 </tr><tr>
  <td>
  <p>28</p>
  </td>
  <td>
  <p>EvtVarTypeUInt32Array</p>
  </td>
  <td>
  <p>KeywordMessageID</p>
  </td>
 </tr></tbody></table><p>The server MUST NOT update its state.</p><p>The server MUST return a value indicating success or failure
for this operation.</p></div>