<div class="content" name="EvtRpcGetPublisherResourceMetadata" uuid="b48108ba-5669-4fde-801d-847086f74d83"><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 <a href="fda52b23-608b-444e-a979-6b62a00e8f48#gt_bb3fad7e-60bf-46d4-9c3f-7caea47a743e" data-linktype="relative-path">event log</a>. This handle is
returned by the EvtRpcGetPublisherMetadata (Opnum 24) method. This parameter is
an <a href="fda52b23-608b-444e-a979-6b62a00e8f48#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> context handle,
as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>,
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>0x00000004</td>
  <td>Publisher help link.</td>
 </tr><tr>
  <td>0x00000005</td>
  <td>Publisher friendly name.</td>
 </tr><tr>
  <td>0x0000000C</td>
  <td>Level information.</td>
 </tr><tr>
  <td>0x00000010</td>
  <td>Task information.</td>
 </tr><tr>
  <td>0x00000015</td>
  <td>Opcode information.</td>
 </tr><tr>
  <td>0x00000019</td>
  <td>Keyword information.</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 <a href="14ba9fda-3402-44b2-b1cd-5318a6613a7f" data-linktype="relative-path">EvtRpcVariantList (section 2.2.9)</a>
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 <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
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 <a href="0011377c-12f8-4440-8629-568b1ec5bcf2" data-linktype="relative-path">3.1.4.25</a>) 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 <a href="9c6673b7-4bf2-42b0-9ab7-242d45ead8ff" data-linktype="relative-path">EvtRpcVariants</a>
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 <a href="df904dfb-00f8-4457-abe0-d7907c64dc71" data-linktype="relative-path">3.1.1.14</a>).</p><table><thead>
  <tr>
   <th>
   <p>Index</p>
   </th>
   <th>
   <p>Type</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>4</td>
  <td>EvtVarTypeString</td>
  <td>HelpLink</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>5</td>
  <td>EvtVarTypeUInt32</td>
  <td>PublisherMessageID</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>13</td>
  <td>EvtVarTypeStringArray</td>
  <td>LevelName</td>
 </tr><tr>
  <td>14</td>
  <td>EvtVarTypeUInt32Array</td>
  <td>LevelValue</td>
 </tr><tr>
  <td>15</td>
  <td>EvtVarTypeUInt32Array</td>
  <td>LevelMessageID</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>17</td>
  <td>EvtVarTypeStringArray</td>
  <td>TaskName</td>
 </tr><tr>
  <td>18</td>
  <td>EvtVarTypeGuidArray</td>
  <td>TaskEventGuid</td>
 </tr><tr>
  <td>19</td>
  <td>EvtVarTypeUInt32Array</td>
  <td>TaskValue</td>
 </tr><tr>
  <td>20</td>
  <td>EvtVarTypeUInt32Array</td>
  <td>TaskMessageID</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>22</td>
  <td>EvtVarTypeStringArray</td>
  <td>OpcodeName</td>
 </tr><tr>
  <td>23</td>
  <td>EvtVarTypeUInt32Array</td>
  <td>OpcodeValue</td>
 </tr><tr>
  <td>24</td>
  <td>EvtVarTypeUInt32Array</td>
  <td>OpcodeMessageID</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>26</td>
  <td>EvtVarTypeStringArray</td>
  <td>KeywordName</td>
 </tr><tr>
  <td>27</td>
  <td>EvtVarTypeUInt64Array</td>
  <td>KeywordValue</td>
 </tr><tr>
  <td>28</td>
  <td>EvtVarTypeUInt32Array</td>
  <td>KeywordMessageID</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>