<div class="content" name="CancelNtmsLibraryRequest" uuid="23246f49-5161-4d82-8a27-28e35cb4f3ea"><p>The CancelNtmsLibraryRequest method cancels outstanding <a href="8d988f06-72be-47cf-9e09-9060aa8ed897#gt_f8da5142-cddf-49b1-b24c-a352db74cbbb" data-linktype="relative-path">library requests</a>.</p><dl>
<dd>
<div><pre> HRESULT CancelNtmsLibraryRequest(
   [in] LPNTMS_GUID lpRequestId
 );
</pre></div>
</dd></dl><p><b>lpRequestId: </b>A pointer to the identifier of
the request to cancel.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x00000000 S_OK</td>
  <td>Method completed successfully.</td>
 </tr><tr>
  <td>0x80070005 ERROR_ACCESS_DENIED</td>
  <td>Access to object is denied; only an administrator of the server can cancel library requests.</td>
 </tr><tr>
  <td>0x80070057 ERROR_INVALID_PARAMETER</td>
  <td>Input parameter is invalid.</td>
 </tr><tr>
  <td>0x800710D8 ERROR_OBJECT_NOT_FOUND</td>
  <td>The identifier of the library request object was not found.</td>
 </tr></tbody></table>
</dd></dl><p>Upon receiving this message, the server MUST verify that <i>lpRequestId</i>
is not NULL. If it is NULL, the server MUST immediately fail the operation and
return ERROR_INVALID_PARAMETER (0x80070057).</p><p>If parameter validation succeeds, the server MUST verify
that the <i>lpRequestId</i> is an outstanding request identifier. If the
request identifier is not outstanding, the server MUST return
ERROR_OBJECT_NOT_FOUND (0x8000710D8) and take no further action.</p><p>If the library is busy, the server MUST queue the
cancellation and return success (S_OK); otherwise, the server MUST cancel the
specified library request and return success (S_OK).</p><p>On completion of an asynchronous operation, notification
will be sent with the identifier lpRequestId.</p></div>