ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

acedGetString - ObjectARX 2015

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
bakerrl2
1871 Views, 2 Replies

acedGetString - ObjectARX 2015

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.

2 REPLIES 2
Message 2 of 3
owenwengerd
in reply to: bakerrl2

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.

--
Owen Wengerd
ManuSoft
Message 3 of 3
artc2
in reply to: owenwengerd

The buffer size arguments are indeed in characters not bytes.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost