Platform SDK: Removable Storage Manager |
The SetNtmsObjectAttribute function creates private data in the specified RSM object.
DWORD WINAPI SetNtmsObjectAttribute( HANDLE hSession, LPNTMS_GUID lpObjectId, DWORD dwType, LPCTSTR lpAttributeName, LPVOID lpAttributeData, DWORD dwAttributeSize );
Value | Meaning |
---|---|
ERROR_DATABASE_FAILURE | The database 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_NAME | The name or attribute is invalid. The NTMS_MAXATTR_NAMELEN value defines the maximum attribute name length. The length includes a NULL. |
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 GUID is invalid. |
ERROR_SUCCESS | The function was successful. |
The SetNtmsObjectAttribute function must be executed on the specified RSM server. Because the buffer of bytes is unmarshaled between systems of different architectures, remote execution of this function can result in unpredictable results.
To delete an attribute, perform a set of the attribute with a length of zero.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Ntmsapi.h.
Library: Use Ntmsapi.lib.
Object Management Functions, EnumerateNtmsObject, GetNtmsObjectAttribute