WSReleaseUCS2ErrorMessage()
This feature is not supported on the Wolfram Cloud.

void WSReleaseUCS2ErrorMessage(WSLINK l, const unsigned short *m, int n)
releases memory allocated by WSUCS2ErrorMessage() stored in m, an array of UCS2 characters of length n.

DetailsDetails

  • The memory used to hold the message m must have been allocated by a call to WSUCS2ErrorMessage().
  • WSReleaseUCS2ErrorMessage() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

/* A function for getting the error message from a link */

void f(WSINK l)
{
    const unsigned short *message;
    int length;

    message = WSUCS2ErrorMessage(l, &length);
    if(message == (const unsigned short *)0 || length == 0)
    { /* Unable to get the error message from the link */ }

    /* ... */

    WSReleaseUCS2ErrorMessage(l, message, length);
}
Introduced in 2014
(10.0)