2018-09-27 04:03 PM - last edited on 2022-10-06 01:04 PM by Daniel Kassai
Solved! Go to Solution.
2018-10-19 10:21 PM
GS::ErrCode MyUserData::DelToAttrib(const API_Attribute& attrib) const { API_AttributeUserData userData = {}; userData.dataHdl = nullptr; API_Attr_Head attHead = {}; attHead.index = attrib.header.index; attHead.typeID = attrib.header.typeID; GSErrCode err = ACAPI_Attribute_SetUserData(&attHead, &userData); BMKillHandle(&userData.dataHdl); return err; }
2018-10-26 09:45 AM
2018-11-08 03:45 PM
kzaremba wrote:Yes, it's possible, but could be very hard to maintain.
Do you think there is a possibility to start GitRepository (or similar solution) to create the library of classes working with actual API (like the example above)? So if someone is interested in developing such an approach could collaborate and build upon some examples like this? This might be an even better way to share this knowledge than the forum where some topics are covered by the others.
2018-11-08 04:57 PM
2018-11-08 05:29 PM
kzaremba wrote:You don't have to delete the userdata, because if you call ACAPI_Attribute_SetUserData to the attribute for the second time then it will automatically overwrite the existing userdata.
I have some troubles with overwriting data. I assumed that the easiest way would be to delete user data and set a new one.
kzaremba wrote:Your code is ok, except the BMKillHandle call, I think that line caused the crash, because the userData.dataHdl is nullptr there.
I assume that some treatment od memorychannel is necessary, but all my attempts just crashed AC. Please help.... userData.dataHdl = nullptr; ... BMKillHandle(&userData.dataHdl); ...
2018-11-11 03:14 PM