3.2.5.2.2.8 INtmsMediaServices1::DeleteNtmsMedia (Opnum 11)

The DeleteNtmsMedia method deletes a physical piece of offline media by removing all references to it.

 HRESULT DeleteNtmsMedia(
   [in] LPNTMS_GUID lpMediaId
 );

lpMediaId: A pointer to the identifier of a physical medium.

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070005

ERROR_ACCESS_DENIED

NTMS_MODIFY_ACCESS to the library is denied; other security errors are possible but indicate a security subsystem error.

0x80070008

ERROR_NOT_ENOUGH_MEMORY

An allocation error occurred during processing.

0x80070057

ERROR_INVALID_PARAMETER

The media identifier is missing.

0x800710CC

ERROR_INVALID_MEDIA

The media identifier is invalid.

0x800710CE

ERROR_INVALID_MEDIA_POOL

The media pool of the media is invalid.

0x800710D9

ERROR_DATABASE_FAILURE

The database is inaccessible or damaged.

0x800710DA

ERROR_DATABASE_FULL

The database is full.

0x8007139F

ERROR_INVALID_STATE

The media is not offline.

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

If parameter validation succeeds, the server MUST verify 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).

The DeleteNtmsMedia method deletes a physical piece of offline media from the server by removing all references to the specified medium from the database.

Media specified by the DeleteNtmsMedia method MUST be located in an offline library and not have a side in the allocated, completed, or reserved states.