MLReleaseUCS2ErrorMessage (C 函数)
MLReleaseUCS2ErrorMessage 已经被 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.
更多信息
- 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.
范例
基本范例 (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);
}