In ObjectARX 2015 the acedGetString function now requires the programmer to specify the buffer size.
Example:
int acedGetString (int cronly, constACHAR *prompt, ACHAR *result, size_t bufsize);
Does the bufsize variable specify the number of bytes in the buffer or the number of characters?
I couldn't find any information on the acedGetString function in the ObjectARX 2015 help. I did find some information on a acedGetStringB function which doesn't exist in the ObjectARX 2015 header files. In addition the help for acedGetStringB is not clear whether the buffer size is the number of bytes or characters.
At this point I am assuming that the buf size is the number of characters.
Also, I am assuming that acedGetStringB was from a previous version of ObjectARX and it has now replaced the original acedGetString function.
I have a similar question about acedGetKword. Can't find any documentation on it.
Solved! Go to Solution.
Solved by artc2. Go to Solution.
Solved by owenwengerd. Go to Solution.
It looks like there's some leftover garbage text in the 'Returns' section of the help page for acedGetStringB that documents bufsize as "Size of the result buffer, in bytes". However, if you inspect the templated acedGetString function defined in acedads.h you can see that it passes bufsize as the number of characters. I expect that it is number of characters, and a peek at my code confirms that I have operated under that assumption without any problems, but I don't recall how thoroughly I tested it.