[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The GetNtmsObjectAttribute function retrieves the extended attribute (named private data) from the specified RSM object.
DWORD GetNtmsObjectAttributeA( HANDLE hSession, LPNTMS_GUID lpObjectId, DWORD dwType, LPCSTR lpAttributeName, LPVOID lpAttributeData, LPDWORD lpAttributeSize );
Handle to the session returned by the OpenNtmsSession function.
Unique identifier of the object from which to retrieve the data.
RSM object type. For a list of object types, see NtmsObjectsTypes.
Name of the extended attribute whose data is to be retrieved.
Pointer to the buffer that receives the data.
Size of the data buffer on input, in bytes. On output, the actual size of the data, in bytes.
This function returns one of the following values.
NTMS_USE_ACCESS to the object or its container is denied. Other security errors are also possible, but they would indicate a security subsystem error.
Windows XP: No access rights are required.
||The database query or update failed.|
||The buffer size is not correctly specified. The correct size is returned in the lpAttributeSize parameter.|
||The value specified in the hSession parameter is NULL or is not valid.|
||The pointer is NULL or is not valid.|
||Unable to connect to the RSM service.|
||The specified attribute was not found.|
||The function was successful.|
The GetNtmsObjectAttribute function must be executed on the RSM server. Because the buffer of bytes is unmarshaled between systems of different architectures, remote execution of this function may result in unpredictable results.
The following is the list of objects that require special access rights.
|NTMS_CHANGER||Requires NTMS_USE_ACCESS to the library.|
|NTMS_CHANGER_TYPE||Requires NTMS_USE_ACCESS to the computer.|
|NTMS_COMPUTER||Requires NTMS_USE_ACCESS to the computer.|
|NTMS_DRIVE||Requires NTMS_USE_ACCESS to the library.|
|NTMS_DRIVE_TYPE||Requires NTMS_USE_ACCESS to the computer.|
|NTMS_IEDOOR||Requires NTMS_USE_ACCESS to the library.|
|NTMS_IEPORT||Requires NTMS_USE_ACCESS to the library.|
|NTMS_LIBRARY||Requires NTMS_USE_ACCESS to the library.|
|NTMS_LIBREQUEST||Requires NTMS_USE_ACCESS to the library.|
|NTMS_LOGICAL_MEDIA||Requires NTMS_USE_ACCESS to the media pool of the logical media.|
|NTMS_MEDIA_POOL||Requires NTMS_USE_ACCESS to the media pool.|
|NTMS_MEDIA_TYPE||Requires NTMS_USE_ACCESS to the computer.|
|NTMS_OPREQUEST||Requires NTMS_USE_ACCESS to the computer.|
|NTMS_PARTITION||Requires NTMS_USE_ACCESS to the media pool of the side.|
|NTMS_PHYSICAL_MEDIA||Requires NTMS_USE_ACCESS to the media pool.|
|NTMS_STORAGESLOT||Requires NTMS_USE_ACCESS to the library.|
|Windows version||Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]|