MLReleaseUCS2ErrorMessage (C Function)
MLReleaseUCS2ErrorMessage has been replaced by WSReleaseUCS2ErrorMessage.
void MLReleaseUCS2ErrorMessage(MLINK l, const unsigned short *m, int n)
releases memory allocated by MLUCS2ErrorMessage() stored in m, an array of UCS2 characters of length n.
Details
- The memory used to hold the message m must have been allocated by a call to MLUCS2ErrorMessage().
- MLReleaseUCS2ErrorMessage() is declared in the MathLink header file mathlink.h.
Examples
Basic Examples (1)
#include "mathlink.h"
/* A function for getting the error message from a link */
void f(MLINK l)
{
const unsigned short *message;
int length;
message = MLUCS2ErrorMessage(l, &length);
if(message == (const unsigned short *)0 || length == 0)
{ /* Unable to get the error message from the link */ }
/* ... */
MLReleaseUCS2ErrorMessage(l, message, length);
}