Reply To: Returning strings from C functions

homepage Forums BridgePoint/xtUML Usage and Training Returning strings from C functions Reply To: Returning strings from C functions

#2461
Lee Riemenschneider
Participant

I think the main reason I liked it is that it appears to give more flexibility over the span of the call. Consider that we have a pointer that is known by both the callee and the caller. The callee can resize the pointed to memory space, or can write within the original size. The callee can take the value pointed to, send it to another process, and write the returned value into the memory space. i.e., asynchronous handling of a synchronous call.

Of course, there are some further questions raised. Do we need a size parameter, or will all strings be NULL terminated? Is there any danger of overwriting memory?