HRESULT DisableNtmsObject( [in] DWORD dwType, [in] LPNTMS_GUID lpObjectId ); dwType: One of the NTMS_DRIVE, NTMS_LIBRARY, or NTMS_PHYSICAL_MEDIA values from the enumeration, specifying the type of the object. lpObjectId: A pointer to the identifier of the object to disable. Return value/code Description 0x00000000 The call was successful. S_OK 0x80070005 NTMS_CONTROL_ACCESS to the library containing the object is denied. ERROR_ACCESS_DENIED 0x80070057 The parameter is NULL or invalid. ERROR_INVALID_PARAMETER 0x800710D1 The lpObjectId parameter refers to an offline library that cannot be enabled or disabled. ERROR_LIBRARY_OFFLINE 0x800710D8 The lpObjectId parameter is invalid. ERROR_OBJECT_NOT_FOUND 0x800710D9 The database is inaccessible or damaged. ERROR_DATABASE_FAILURE 0x8007139F The object is already disabled. ERROR_INVALID_STATE 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). INtmsObjectManagement1::EnableNtmsObject (Opnum 11) The EnableNtmsObject method enables an object. HRESULT EnableNtmsObject( [in] dwType, [in] LPNTMS_GUID lpObjectId ); dwType: One of the NTMS_DRIVE, NTMS_LIBRARY, or NTMS_PHYSICAL_MEDIA values from the enumeration, specifying the type of the object. lpObjectId: A pointer to the identifier of the object to enable. Return value/code Description
HRESULT DisableNtmsObject( [in] DWORD dwType, [in] LPNTMS_GUID lpObjectId ); dwType: One of the NTMS_DRIVE, NTMS_LIBRARY, or NTMS_PHYSICAL_MEDIA values from the 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). INtmsObjectManagement1::EnableNtmsObject (Opnum 11) The EnableNtmsObject method enables an object. HRESULT EnableNtmsObject( [in] dwType, [in] LPNTMS_GUID lpObjectId ); dwType: One of the NTMS_DRIVE, NTMS_LIBRARY, or NTMS_PHYSICAL_MEDIA values from the enumeration, specifying the type of the object. lpObjectId: A pointer to the identifier of the object to enable. Return value/code Description