SetNtmsObjectInformation

[This is preliminary documentation and subject to change.]

The SetNtmsObjectInformation function changes the information structure of the specified object.

DWORD WINAPI SetNtmsObjectInformation(
  HANDLE hSession,
  LPNTMS_GUID lpObjectId,
  LPNTMS_OBJECTINFORMATION lpInfo
);
 

Parameters

hSession
Handle to the session returned by the OpenNtmsSession function.
lpObjectId
Specifies the unique identifier of the RSM object.
lpInfo
Pointer to the NTMS_OBJECTINFORMATION structure.

Return Values

ERROR_ACCESS_DENIED
NTMS_MODIFY_ACCESS or NTMS_CONTROL_ACCESS is denied to the object being written or no modifications are allowed to the object type specified. Access required is as follows:
NTMS_MEDIA_POOL
NTMS_CONTROL_ACCESS to the media pool.
NTMS_LOGICAL_MEDIA
NTMS_MODIFY_ACCESS to the media pool of the logical media.
NTMS_LIBRARY
NTMS_CONTROL_ACCESS to the library.
NTMS_CHANGER
No write fields.
NTMS_DRIVE
No write fields.
NTMS_CHANGER_TYPE
No write fields.
NTMS_DRIVE_TYPE
No write fields.
NTMS_STORAGESLOT
No write fields.
NTMS_IEDOOR
No write fields.
NTMS_IEPORT
No write fields.
NTMS_PHYSICAL_MEDIA
No write fields.
NTMS_PARTITION
NTMS_MODIFY_ACCESS to the media pool of the partition.
NTMS_MEDIA_TYPE
No write fields.
NTMS_OPREQUEST
No write fields.
NTMS_LIBREQUEST
No write fields.
ERROR_SUCCESS
The function was successful.
ERROR_DATABASE_FAILURE
The database is inaccessible or damaged.
ERROR_DATABASE_FULL
The database is full.
ERROR_INVALID_HANDLE
The session handle is invalid or missing.
ERROR_INVALID_PARAMETER
The object ID or information structure is missing, or the object information size or object type is invalid.
ERROR_NOT_ENOUGH_MEMORY
An allocation failure occurred during processing.
ERROR_OBJECT_NOT_FOUND
The object ID is invalid.

Remarks

Not all information in an object can be set using the SetNtmsObjectInformation function. For writable fields, see object definitions.

The information size and type must be set before you can use SetNtmsObjectInformation.

All writable properties for the object are read from the NTMS_OBJECTINFORMATION structure and written to the database without regard for any write operations that have occurred between the time this application called the GetNtmsObjectInformation function and the SetNtmsObjectInformation function. Because of this you can lose changes.

To avoid unpredictable results, applications must call GetNtmsObjectInformation before calling SetNtmsObjectInformation. As noted above, SetNtmsObjectInformation updates all writable fields, therefore the application is responsible for providing a value for all writable fields.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in ntmsapi.h.
  Import Library: Use ntmsapi.lib.

See Also

Object Management Functions, GetNtmsObjectInformation, GetNtmsObjectSecurity, NTMS_OBJECTINFORMATION