Attaches user data to an attribute, or deletes the attached data.
GSErrCode ACAPI_Attribute_SetUserData ( API_Attr_Head* attrHead, const API_AttributeUserData* userData );
Parameters
- attrHead
- [in] The attribute to attach the user data to is defined by the
typeID
andindex
fields of the header. - userData
- [in] The user data to store. If
dataHdl
isnullptr
, then the function deletes the user data.
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
- A
nullptr
attrHead
oruserData
pointer was passed. APIERR_BADPLATFORMSIGN
- The platform sign in the user data is invalid (out of range).
For other common API errors see the API Errors document.
Remarks
This function is used to attach user data to an an atribute, or to delete the attached information (if userData->dataHdl
is nullptr
. The caller is responsible for allocating and deleting the userData->dataHdl
. You can safely destroy the passed handle after use, as it is copied into the internal database.
This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.
Requirements
- Version: API 4.1 or later
- Header: ACAPinc.h
See Also
API_Attr_Head, API_AttributeUserData,
ACAPI_Attribute_GetUserData,
Attribute Manager, API Functions