<div class="content" name="DeleteNtmsMediaPool" uuid="2241adb2-1e55-41cb-a2c3-0c6e429c04fb"><p>The DeleteNtmsMediaPool method deletes an application media
pool.</p><dl>
<dd>
<div><pre> HRESULT DeleteNtmsMediaPool(
   [in] LPNTMS_GUID lpPoolId
 );
</pre></div>
</dd></dl><p><b>lpPoolId: </b>A pointer to the identifier of a
media pool.</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>The call was successful.</td>
 </tr><tr>
  <td>0x80070005 ERROR_ACCESS_DENIED</td>
  <td>NTMS_CONTROL_ACCESS to the media pool is denied (for more information, see [MSDN-SetNtmsObjectSecurity]); other security errors are possible, but indicate a security subsystem error.</td>
 </tr><tr>
  <td>0x80070008 ERROR_NOT_ENOUGH_MEMORY</td>
  <td>An allocation failure occurred during processing.</td>
 </tr><tr>
  <td>0x80070057 ERROR_INVALID_PARAMETER</td>
  <td>The media pool identifier is missing.</td>
 </tr><tr>
  <td>0x800710CE ERROR_INVALID_MEDIA_POOL</td>
  <td>Unable to open the media pool or delete the free, import, or unrecognized media pools.</td>
 </tr><tr>
  <td>0x800710D3 ERROR_NOT_EMPTY</td>
  <td>The media pool must be empty to be deleted.</td>
 </tr><tr>
  <td>0x800710D9 ERROR_DATABASE_FAILURE</td>
  <td>The database is inaccessible or damaged.</td>
 </tr></tbody></table>
</dd></dl><p>The DeleteNtmsMediaPool method deletes the specified
application media pool. Only empty media pools can be deleted with the
DeleteNtmsMediaPool method. Free, unrecognized, and import media pools are
managed by RSM and cannot be deleted with DeleteNtmsMediaPool.</p><p>Upon receiving this message, the server MUST verify that <i>lpPoolId</i>
is not NULL; otherwise, the server MUST immediately fail the operation and
return ERROR_INVALID_PARAMETER (0x80070057).</p><p>The server MUST verify that the user has the required access
rights.</p><p>The server MUST check that the parent is not in a SCRATCH/IMPORT/FOREIGN
media pool; if it is, it MUST NOT perform the delete and MUST return
ERROR_INVALID_MEDIA_POOL. Otherwise, the server MUST delete the media pool from
the database.</p></div>