3.2.5.2.2.14 INtmsMediaServices1::DeleteNtmsMediaPool (Opnum 17)

The DeleteNtmsMediaPool method deletes an application media pool.

 HRESULT DeleteNtmsMediaPool(
   [in] LPNTMS_GUID lpPoolId
 );

lpPoolId: A pointer to the identifier of a media pool.

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070005

ERROR_ACCESS_DENIED

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.

0x80070008

ERROR_NOT_ENOUGH_MEMORY

An allocation failure occurred during processing.

0x80070057

ERROR_INVALID_PARAMETER

The media pool identifier is missing.

0x800710CE

ERROR_INVALID_MEDIA_POOL

Unable to open the media pool or delete the free, import, or unrecognized media pools.

0x800710D3

ERROR_NOT_EMPTY

The media pool must be empty to be deleted.

0x800710D9

ERROR_DATABASE_FAILURE

The database is inaccessible or damaged.

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.

Upon receiving this message, the server MUST verify that lpPoolId is not NULL; otherwise, the server MUST immediately fail the operation and return ERROR_INVALID_PARAMETER (0x80070057).

The server MUST verify that the user has the required access rights.

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.