INtmsObjectManagement1::SetNtmsObjectAttributeW (Opnum 8)

 The SetNtmsObjectAttributeW method changes the private data of an object, with strings encoded using Unicode.

 HRESULT SetNtmsObjectAttributeW(
   [in] LPNTMS_GUID lpObjectId,
   [in] DWORD dwType,
   [in, string] const wchar_t* lpAttributeName,
   [in, size_is(AttributeSize)] byte* lpAttributeData,
   [in] DWORD AttributeSize

lpObjectId: A pointer to the identifier of the object for which to set private data.

dwType: A value from the NtmsObjectsTypes (section enumeration specifying the type of the object.

lpAttributeName: A null-terminated sequence of Unicode characters specifying the name of the extended attribute to set. The client can give any name to the extended attribute and MUST use the same name in the GetNtmsObjectAttributeW method.

lpAttributeData: The buffer containing the attribute.

AttributeSize: The size of lpAttributeData.

Return value/code




The call was successful.



Access to the object is denied; other security errors are possible but indicate a security subsystem error.



An allocation failure occurred during processing.



The parameter is not valid.



The attribute name is invalid or too long. The NTMS_MAXATTR_NAMELEN value, defined in the Platform SDK file NTMSApi.h, specifies the maximum null-terminated attribute name length.



The object was not found.



Unable to connect to the RSM service.

Upon receiving this message, the server MUST verify that lpObjectId, lpAttributeData, and lpAttributeName are not NULL.

If parameter validation succeeds, the server MUST verify that the user has the required access rights, and determine the validity of the object. If the client does not have the required access rights, NTMS_MODIFY_ACCESS to the object specified in lpOjbectID is denied and the server MUST return ERROR_ACCESS_DENIED (0x80070005). If the object is valid, the server MUST update the object attribute depending on the type of object specified. If the object is not valid, the server MUST return ERROR_INVALID_PARAMETER (0x80070057). If the object is valid and dwType is invalid, the server MUST ignore the invalid dwType.

Strings sent to this method as parameters MUST be Unicode-encoded.