<div class="content"><p>The SetNtmsRequestOrder method sets the order in which a
request will be processed in the library queue.</p><dl>
<dd>
<div><pre> HRESULT SetNtmsRequestOrder(
   [in] LPNTMS_GUID lpRequestId,
   [in] DWORD dwOrderNumber
 );
</pre></div>
</dd></dl><p><b>lpRequestId: </b>A pointer to the identifier of a <a href="8d988f06-72be-47cf-9e09-9060aa8ed897#gt_f8da5142-cddf-49b1-b24c-a352db74cbbb" data-linktype="relative-path">library request</a>.</p><p><b>dwOrderNumber: </b> The order in the queue in
which the request will be processed. This queue MUST start with order 1.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000000</p>
  <p>S_OK</p>
  </td>
  <td>
  <p>The call was successful.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070005</p>
  <p>ERROR_ACCESS_DENIED</p>
  </td>
  <td>
  <p>NTMS_CONTROL_ACCESS to the library is denied; other
  security errors are possible but indicate a security subsystem error.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070008</p>
  <p>ERROR_NOT_ENOUGH_MEMORY</p>
  </td>
  <td>
  <p>An allocation failure occurred during processing.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070057</p>
  <p>ERROR_INVALID_PARAMETER</p>
  </td>
  <td>
  <p>The library or operation identifiers are missing.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x800710D9</p>
  <p>ERROR_DATABASE_FAILURE</p>
  </td>
  <td>
  <p>The database is inaccessible or damaged.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>Upon receiving this message, the server MUST verify that <i>lpRequestId</i>
is not NULL, and dwOrderNumber is valid. If parameter validation fails, the
server MUST immediately fail the operation and return ERROR_INVALID_PARAMETER
(0x80070057).</p><p>If parameter validation succeeds, the server MUST compose a
response to the client after verifying that the user has the required access
rights. If the client does not have the required access rights, the server MUST
return ERROR_ACCESS_DENIED (0x80070005).</p><p>The SetNtmsRequestOrder method sets the order that the
specified request will be processed in the library queue. </p><p>The server MUST maintain the request queue sorted by request
types, as specified in section <a href="1fcfe730-c093-432d-b1cb-67cd94fe87b1" data-linktype="relative-path">2.2.4.3</a>. The server MAY
select its own ordering mechanism within the same type of requests.<a id="Appendix_A_Target_22"></a><a aria-label="Product behavior note 22" href="7184b376-4ee3-4482-b9c4-f87ff22b421f#Appendix_A_22" data-linktype="relative-path">&lt;22&gt;</a></p></div>