UpdateNtmsOmidInfo

[This is preliminary documentation and subject to change.]

The UpdateNtmsOmidInfo function updates the RSM database with label information immediately after writing to the newly allocated medium.

DWORD WINAPI UpdateNtmsOmidInfo(
  HANDLE hSession, 
  LPNTMS_GUID lpMediaId,
  DWORD labelType,
  DWORD numberOfBytes,
  LPVOID lpBuffer
);
 
typedef struct
  {
    WCHAR   FileSystemType[64];
    WCHAR   VolumeName[256];
    DWORD   SerialNumber;
} FILESYSTEM_INFO;
 

Parameters

hSession
Handle to the session returned by the OpenNtmsSession function.
lpMediaId
Specifies the unique identifier of a piece of logical media.
labelType
Specifies whether the label is a string contained in lpBuffer, or is a FILESTSYSTEM_INFO structure contained in lpBuffer. This parameter can be set to one of the following values.
Value Meaning
NTMS_OMID_TYPE_FILESYSTEM_INFO The lpBuffer argument contains the raw bytes of the application label. This flag is used for Erasable/Optical and CD-ROM media that are labeled with file systems.
NTMS_OMID_TYPE_RAW_LABEL The lpBuffer argument contains the FILESYSTEM_INFO structure. This flag is used for tape media.

numberOfBytes
Specifies the number of bytes sent in the lpBuffer parameter.
lpBuffer
Contains the actual label information, either raw bytes or a FILESYSTEM_INFO structure, depending on the setting of the labelType argument.

Return Values

ERROR_ACCESS_DENIED
Access to one or more RSM objects is denied.
ERROR_DATABASE_FAILURE
The database query or update failed.
ERROR_INVALID_HANDLE
The value specified in the hSession parameter is invalid.
ERROR_INVALID_MEDIA
Unable to retrieve the logical media definition from the database.
ERROR_INVALID_PARTITION
Unable to retrieve the partition definition from the database.
ERROR_INVALID_PARAMETER
The lpMediaId parameter is NULL.
ERROR_NOT_CONNECTED
Unable to connect to the RSM service.
ERROR_SUCCESS
The function was successful.

Remarks

The application updates RSM with the information supplied by the UpdateNtmsOmidInfo function and RSM verifies the information in the database. The label information is stored in the RSM database with the partition associated with this LMID.

The UpdateNtmsOmidInfofunction must be executed on the RSM server. Remote execution of this function results in an error.

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

On-Media-Identifier Management Functions