Platform SDK: Removable Storage Manager

GetNtmsObjectAttribute

The GetNtmsObjectAttribute function gets private data from the specified RSM object.

DWORD WINAPI GetNtmsObjectAttribute(
  HANDLE hSession,
  LPNTMS_GUID lpObjectId,
  DWORD dwType,
  LPCTSTR lpAttributeName,
  LPVOID lpAttributeData,
  LPDWORD lpAttributeSize
);

Parameters

hSession
Handle to the session returned by the OpenNtmsSession function.
lpObjectId
Specifies the GUID of the object from which to retrieve the attribute.
dwType
Specifies the RSM object type. See EnumerateNtmsObject for object types.
lpAttributeName
Specifies the name for the extended attribute to get from the RSM objects.
lpAttributeData
Pointer to the buffer in which the attribute is returned.
lpAttributeSize
Specifies the size of the attribute data buffer on input and returns the actual size of the attribute data on return.

Return Values

Value Meaning
ERROR_DATABASE_FAILURE The database query or update failed.
ERROR_INSUFFICIENT_BUFFER The buffer size is not correctly specified. The correct size is returned in the lpAttributeSize parameter.
ERROR_INVALID_HANDLE The value specified in the hSession parameter is NULL or invalid.
ERROR_INVALID_PARAMETER The pointer is NULL or invalid.
ERROR_NO_DATA The attribute specified is greater than or equal to NTMS_MAXATTR_LENGTH.
ERROR_NOT_CONNECTED Unable to connect to the RSM service.
ERROR_OBJECT_NOT_FOUND The specified attribute was not found.
ERROR_SUCCESS The function was successful.

Remarks

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.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Ntmsapi.h.
  Library: Use Ntmsapi.lib.

See Also

Object Management Functions, EnumerateNtmsObject, SetNtmsObjectAttribute