3.2.5.2.3.3 INtmsObjectInfo1::SetNtmsObjectInformationA (Opnum 5)

The SetNtmsObjectInformationA method changes the information of an object, with strings encoded using ASCII.

 HRESULT SetNtmsObjectInformationA(
   [in] LPNTMS_GUID lpObjectId,
   [in] LPNTMS_OBJECTINFORMATIONA lpInfo
 );

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

lpInfo:  A pointer to an NTMS_OBJECTINFORMATIONA structure describing the properties of the object to change.

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070005

ERROR_ACCESS_DENIED

Access to an object was denied.

0x80070008

ERROR_NOT_ENOUGH_MEMORY

An allocation failure occurred during processing.

0x80070057

ERROR_INVALID_PARAMETER

A parameter is not valid.

0x800710D9

ERROR_DATABASE_FAILURE

The database query or update failed.

0x800710DA

ERROR_DATABASE_FULL

The database is full.

Upon receiving this message, the server MUST verify that both lpObjectId and lpInfo are 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. If the client does not have the required access rights, the server MUST return ERROR_ACCESS_DENIED (0x80070005).

All writable properties (as specified in the following table) for the object MUST be read from the NTMS_OBJECTINFORMATIONA structure and written to the database, regardless of any write operations that have occurred between the time this application called the GetNtmsServerObjectInformationA method and the SetNtmsObjectInformationA method.

The following objects have members that can be updated.

 Object

 Members

NTMS_CHANGER

szDescription

MAY require NTMS_MODIFY_ACCESS to the library.<33>

NTMS_CHANGER_TYPE

szDescription

MAY require NTMS_MODIFY_ACCESS to the computer.<34>

NTMS_COMPUTER

dwMediaPoolPolicy

dwLibRequestFlags

dwLibRequestPurgeTime

dwOpRequestFlags

dwOpRequestPurgeTime

szDescription

MAY require NTMS_MODIFY_ACCESS to the computer.<35>

NTMS_DRIVE

dwDeferDismountDelay

szDescription

MAY require NTMS_MODIFY_ACCESS to the library.<36>

NTMS_DRIVE_TYPE

szDescription

MAY require NTMS_MODIFY_ACCESS to the computer.<37>

NTMS_IEDOOR

MaxOpenSecs

szDescription

MAY require NTMS_MODIFY_ACCESS to the library.<38>

NTMS_IEPORT

MaxExtendSecs

szDescription

MAY require NTMS_MODIFY_ACCESS to the library.<39>

NTMS_LIBRARY

AutoRecovery

dwCleanerUsesRemaining

dwFlags

InventoryMethod

szDescription

szName

MAY require NTMS_CONTROL_ACCESS to the library.<40>

NTMS_LIBREQUEST

szDescription

MAY require NTMS_MODIFY_ACCESS to the library.<41>

NTMS_LOGICAL_MEDIA

szDescription

szName

MAY require NTMS_MODIFY_ACCESS to the media pool of the logical media.<42>

NTMS_MEDIA_POOL

AllocationPolicy

DeallocationPolicy

dwMaxAllocates

MediaType

szDescription

szName

MAY require NTMS_MODIFY_ACCESS to the media pool.<43>

NTMS_MEDIA_TYPE

szDescription

MAY require NTMS_MODIFY_ACCESS to the computer.<44>

NTMS_OPREQUEST

szDescription

MAY require NTMS_MODIFY_ACCESS to the computer.<45>

NTMS_PARTITION

szName

szDescription

MAY require NTMS_MODIFY_ACCESS to the media pool of the side.<46>

NTMS_PHYSICAL_MEDIA

szDescription

szName

MAY require NTMS_MODIFY_ACCESS to the media pool.<47>

NTMS_STORAGESLOT

szDescription

MAY require NTMS_MODIFY_ACCESS to the library.<48>

Strings sent to this method as parameters MUST be ASCII-encoded.