OpenersNotesSection(Spacer1)Details

The memory used to hold the message m must have been allocated by a call to (NonWLLink[MLUCS2ErrorMessage(), paclet:/ref/c/MLUCS2ErrorMessage]).

MLReleaseUCS2ErrorMessage() is declared in the MathLink header file (RefLink[mathlink.h, paclet:/ref/file/mathlink.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)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);
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLUCS2ErrorMessage(), paclet:/ref/c/MLUCS2ErrorMessage])  ▪  (NonWLLink[MLReleaseErrorMessage(), paclet:/ref/c/MLReleaseErrorMessage])  ▪  (NonWLLink[MLReleaseUTF16ErrorMessage(), paclet:/ref/c/MLReleaseUTF16ErrorMessage])  ▪  (NonWLLink[MLReleaseUTF32ErrorMessage(), paclet:/ref/c/MLReleaseUTF32ErrorMessage])  ▪  (NonWLLink[MLReleaseUTF8ErrorMessage(), paclet:/ref/c/MLReleaseUTF8ErrorMessage])}})}})