Platform SDK: Removable Storage Manager |
The SetNtmsObjectInformation function changes the information structure of the specified object.
DWORD WINAPI SetNtmsObjectInformation( HANDLE hSession, LPNTMS_GUID lpObjectId, LPNTMS_OBJECTINFORMATION lpInfo );
Value | Meaning |
---|---|
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:
|
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. |
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.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Ntmsapi.h.
Library: Use Ntmsapi.lib.
Object Management Functions, GetNtmsObjectInformation, GetNtmsObjectSecurity, NTMS_OBJECTINFORMATION