MLReleaseUTF16ErrorMessage (C 函数)
MLReleaseUTF16ErrorMessage 已经被 WSReleaseUTF16ErrorMessage 所取代.
void MLReleaseUTF16ErrorMessage(MLINK l, const unsigned short *m, int n)
releases memory allocated by MLUTF16ErrorMessage() to store the UTF-16 encoded message in m, an array of length n.
更多信息
- The memory used to contain the message m must have been allocated by a call to MLUTF16ErrorMessage().
- MLReleaseUTF16ErrorMessage() is declared in the MathLink header file mathlink.h.
范例
基本范例 (1)
#include "mathlink.h"
/* A function to retrieve the error message from a link */
void f(MLINK l)
{
const unsigned short *message;
int length;
message = MLUTF16ErrorMessage(l, &length);
/* We test for length <= 1 because MLUTF16Error message
returns a string that begins with a byte order mark */
if(message == (const unsigned short *)0 || length <= 1)
{ /* Unable to retrieve the error message from the link */ }
/* ... */
MLReleaseUTF16ErrorMessage(l, message, length);
}