Problem about GS::uchar_t
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2007-07-05
04:53 AM
- last edited on
‎2023-08-07
10:26 AM
by
Doreena Deng
‎2007-07-05
04:53 AM
I try to use API Dev 11 to develop my Add-on. And I found that GSRoot Document (come with API Dev 11) is out-of-date. I can not find any method (fuction) to work with GS::uchar_t ( such as GS::ucscpy ...). So I must try some code in an example.
I can use some example-code to develop Add-on that can change 'realValue' parameter of my Object. But when I try to change 'uStrValue' parameter using code like ...
CHCopyC ("Dir", chgParam.name);
GS::UniString tmpUStr ("Left");
GS::ucscpy (chgParam.uStrValue, tmpUStr.ToUStr());
My ArchiCAD will be crash !
How can I solve this problem and how can I find document about GS::uchar_t ?
Thank you
Hemmachart R.
I can use some example-code to develop Add-on that can change 'realValue' parameter of my Object. But when I try to change 'uStrValue' parameter using code like ...
CHCopyC ("Dir", chgParam.name);
GS::UniString tmpUStr ("Left");
GS::ucscpy (chgParam.uStrValue, tmpUStr.ToUStr());
My ArchiCAD will be crash !
How can I solve this problem and how can I find document about GS::uchar_t ?
Thank you
Hemmachart R.
Labels:
- Labels:
-
Add-On (C++)
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2007-07-08 01:33 AM
‎2007-07-08
01:33 AM
Hemmachart wrote:'uStrValue' is a pointer in 'API_ChangeParamType'. You can't simply copy characters to the address it points to without allocating space for the string. You are probably writing to a spurious/random/null location, which explains the crash. Try setting 'uStrValue' to a pointer to the string already allocated in 'tmpUStr'.
GS::ucscpy (chgParam.uStrValue, tmpUStr.ToUStr());
My ArchiCAD will be crash !
Ralph Wessel BArch
Central Innovation
Central Innovation
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2007-07-09 04:59 AM
‎2007-07-09
04:59 AM
It's work !
Thank you very much.
Hemmachr
Thank you very much.
Hemmachr