We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2019-10-07 06:29 PM - last edited on 2022-09-29 10:10 AM by Daniel Kassai
//these are predefined std::string line; Int32 id; char paramname[32]; API_ChangeParamType chgParam; BNZeroMemory(&chgParam, sizeof(API_ChangeParamType)); chgParam.index = id; strcpy(chgParam.name, paramname); GS::ucscpy(chgParam.uStrValue, GS::UniString(line.c_str()).ToUStr().Get()); //GSReporter crashbut it is crashing during ucscpy.
Solved! Go to Solution.
2019-10-08 10:33 AM
GS::uchar_t bufferUStr[API_UAddParStrLen]; GS::ucsncpy (bufferUStr, GS::UniString (line.c_str()).ToUStr().Get(), API_UAddParStrLen - 1); chgParam.uStrValue = bufferUStr;Just make sure, that bufferUStr will live till you use the chgParam
2019-10-08 10:33 AM
GS::uchar_t bufferUStr[API_UAddParStrLen]; GS::ucsncpy (bufferUStr, GS::UniString (line.c_str()).ToUStr().Get(), API_UAddParStrLen - 1); chgParam.uStrValue = bufferUStr;Just make sure, that bufferUStr will live till you use the chgParam
2019-10-08 11:01 AM