3.2.5.2.4.8 INtmsObjectManagement1::DisableNtmsObject (Opnum 10)

The DisableNtmsObject method disables an object.

 HRESULT DisableNtmsObject(
   [in] DWORD dwType,
   [in] LPNTMS_GUID lpObjectId
 );

dwType: One of the NTMS_DRIVE, NTMS_LIBRARY, or NTMS_PHYSICAL_MEDIA values from the NtmsObjectsTypes (section 2.2.1.6) enumeration, specifying the type of the object.

lpObjectId: A pointer to the identifier of the object to disable.

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070005

ERROR_ACCESS_DENIED

NTMS_CONTROL_ACCESS to the library containing the object is denied.

0x80070057

ERROR_INVALID_PARAMETER

The parameter is NULL or invalid.

0x800710D1

ERROR_LIBRARY_OFFLINE

The lpObjectId parameter refers to an offline library that cannot be enabled or disabled.

0x800710D8

ERROR_OBJECT_NOT_FOUND

The lpObjectId parameter is invalid.

0x800710D9

ERROR_DATABASE_FAILURE

The database is inaccessible or damaged.

0x8007139F

ERROR_INVALID_STATE

The object is already disabled.

Upon receiving this message, the server MUST verify that lpObjectId is not NULL. If parameter validation fails, 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, and set the object state to DISABLED. If the client does not have the required access rights, the server MUST return ERROR_ACCESS_DENIED (0x80070005).