<div class="content" name="EvtRpcMessageRenderDefault" uuid="dab3ddb0-9964-4480-a255-be44123eaad4"><p>The EvtRpcMessageRenderDefault (Opnum 10) method is used by
a client to get localized strings for common values of opcodes, tasks, or
keywords, as specified in section <a href="14046f81-06d8-4690-9245-5d8784c25025" data-linktype="relative-path">3.1.4.31</a>. </p><dl>
<dd>
<div><pre> error_status_t EvtRpcMessageRenderDefault(
   /* [in] RPC_BINDING_HANDLE binding, {the binding handle will be generated by MIDL} */
   [in, range(1, MAX_RPC_EVENT_ID_SIZE)] 
     DWORD sizeEventId,
   [in, size_is(sizeEventId)] BYTE *eventId,
   [in] DWORD messageId,
   [in] EvtRpcVariantList *values,
   [in] DWORD flags,
   [in] DWORD maxSizeString,
   [out] DWORD *actualSizeString,
   [out] DWORD *neededSizeString,
   [out, size_is(,*actualSizeString), range(0, MAX_RPC_RENDERED_STRING_SIZE)] 
     BYTE** string,
   [out] RpcInfo *error
 );
</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>sizeEventId: </b>A 32-bit unsigned integer that
contains the size in bytes of the <i>eventId</i> field.</p><p><b>eventId: </b>A pointer to an <a href="../ms-dtyp/a6110d36-28c1-4290-b79e-26aa95a0b1a0" data-linktype="relative-path">EVENT_DESCRIPTOR</a>
structure, as specified in <a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a>
section 2.3.1.</p><p><b>messageId: </b>A 32-bit unsigned integer that
specifies the required message. This is an alternative to using the <i>eventID</i>
parameter that can be used by a client application that has obtained the value
through some method outside those documented by this protocol. The server MUST
ignore this value unless the <i>flags</i> value is set to EvtFormatMessageId,
in which case the server MUST use this value to determine the required message
and ignore the <i>eventID</i> parameter.</p><p><b>values: </b>An array of strings to be used as
substitution values for event description strings. Substitution values MUST be
ignored by the server except when the <i>flags</i> are set to either
EvtFormatMessageEvent or EvtFormatMessageId.</p><p><b>flags: </b>This field MUST be set to a value from
the following table, which indicates the action that the server is requested to
perform.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>EvtFormatMessageEvent 0x00000001</td>
  <td>Locate the message for the event corresponding to eventId, and then insert the values specified by the values parameter.</td>
 </tr><tr>
  <td>EvtFormatMessageLevel 0x00000002</td>
  <td>Extract the level field from eventId, and then return the localized name for that level.</td>
 </tr><tr>
  <td>EvtFormatMessageTask 0x00000003</td>
  <td>Extract the task field from eventId, and then return the localized name for that task.</td>
 </tr><tr>
  <td>EvtFormatMessageOpcode 0x00000004</td>
  <td>Extract the opcode field from eventId, and then return the localized name for that opcode.</td>
 </tr><tr>
  <td>EvtFormatMessageKeyword 0x00000005</td>
  <td>Extract the keyword field from eventId, and then return the localized name for that keyword.</td>
 </tr><tr>
  <td>EvtFormatMessageId 0x00000008</td>
  <td>Locate the message for the event corresponding to the messageId parameter, and then insert the values specified by the values parameter.</td>
 </tr></tbody></table>
</dd></dl><p><b>maxSizeString: </b>A 32-bit unsigned integer that
contains the maximum size in bytes allowed for the <i>string</i> field.</p><p><b>actualSizeString: </b>A pointer to a 32-bit
unsigned integer that contains the actual size of the resulting description
string returned in the string. It MUST be set to the size in bytes of the
string returned in the <i>string</i> parameter, including the NULL (&#39;\0&#39;)
terminating character. If the description string cannot be retrieved,
actualSizeString MUST be set to zero.</p><p><b>neededSizeString: </b>A pointer to a 32-bit
unsigned integer that contains the size in bytes of the fully instantiated
description string, even if the length of the description string is greater
than <i>maxSizeString</i>. The returned value MUST be zero when the description
string cannot be computed by the server.</p><p><b>string: </b>A buffer in which to return either a
null-terminated string or multiple null-terminated strings, terminated by a
double NULL in the case of keywords. In the case of failure, the client MUST
ignore this value.</p><p><b>error: </b> A pointer to an <a href="94a5d4d1-0f80-4af3-b7c6-d61a6aa60b7b" data-linktype="relative-path">RpcInfo (section 2.2.1)</a>
structure in which to place error information in the case of a failure. The
RpcInfo (section 2.2.1) structure fields MUST be set to nonzero
values if the error is related to loading the necessary resource. All nonzero
values MUST be treated the same. If the method succeeds, the server MUST set
all of the values in the structure to 0. </p><p><b>Return Values: </b> The method MUST return the following
value on success.</p><p><b>ERROR_SUCCESS</b> (0x00000000)</p><p>The method MUST return ERROR_INSUFFICIENT_BUFFER
(0x0000007A) if <i>maxSizeString</i> is too small to hold the result string. In
that case, <i>neededSizeString</i> MUST be set to the necessary size.</p><p>Otherwise, the method MUST return a different
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>This method is the same as the
EvtRpcMessageRender (section 3.1.4.31) method, except that this
method always uses the server&#39;s default strings (default strings come from the
server&#39;s default publisher, so a publisher handle is not required), whereas the
EvtRpcMessageRender (section 3.1.4.31) method uses only the default
strings in the case of level, task, opcode, and keyword values that fall in
certain ranges. Therefore it takes only 6 possible format flags. The server
MUST fail the method with ERROR_INVALID_PARAMETER (0x00000057) for any other
flags than the 6 values given in the flags table.</p></div>