int MLGetUCS2String(MLINKlink, const unsigned short **s, int *n) gets a character string from the MathLink connection specified by link, storing the string in s as a sequence of UCS-2 characters.
MLGetUCS2String() allocates memory for the character string. You must call MLReleaseUCS2String() to disown this memory. If MLGetUCS2String() fails and the function's return value indicates an error, do not call MLReleaseUCS2String() on the contents of s.
MLGetUCS2String() returns immutable data.
MLGetUCS2String() stores all characters directly in 16-bit UCS-2 form.
ASCII characters are stored with a null high-order byte.
MLGetUCS2String() returns 0 in the event of an error, and a nonzero value if the function succeeds.
Use MLError() to retrieve the error code if MLGetUCS2String() fails.
MLGetUCS2String() is declared in the MathLink header file mathlink.h.