Function Mem2Str() Foundation
Create a character string from a memory address.
Mem2Str( <nAddress> [, <nLen>] [, @<cMem>] ) --> cMem | NIL
A character string with the data at the specified memory location. If a buffer is passed in parameter <cMem>, however, the string is returned in this buffer and Mem2Str() returns the value NIL.
The function Mem2Str() returns the contents of a certain memory location as a character string. The function is most often used in conjunction with API functions returning pointers to strings residing in memory owned by the callee.
The optional parameter <cMem> can be used for specifying an existing buffer for the resulting character string. This allows the same memory to be used in repeated calls to Mem2Str(), for example, in inner loops. The buffer must be large enough for performing the operation. Otherwise the Mem2Str() function generates a runtime error.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.