OpenersNotesSection(Spacer1)Details

MLGetUTF32Function() allocates memory for the character string corresponding to the name of the head of the function. You must call (NonWLLink[MLReleaseUTF32Symbol(), paclet:/ref/c/MLReleaseUTF32Symbol]) to disown this memory. If MLGetUTF32Function() fails and the function's return value indicates an error, do not call (NonWLLink[MLReleaseUTF32Symbol(), paclet:/ref/c/MLReleaseUTF32Symbol]) on the contents of s.

Programs should not modify the contents of the character string s.

The character string returned by MLGetUTF32Function() begins with a platform-appropriate byte order mark. The byte order mark is included in the length of the symbol v.

MLGetUTF32Function(l, &s, &v, &n) has the same effect as MLGetNext(l); MLGetArgCount(l, &n); MLGetUTF32Symbol(l, &s, &v).

MLGetUTF32Function() returns 0 in the event of an error, and a nonzero value if the function succeeds.

Use (NonWLLink[MLError(), paclet:/ref/c/MLError]) to retrieve the error code if MLGetUTF32Function() fails.

MLGetUTF32Function() 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 reading a Mathematica function from a link */

void f(MLINK l)
{
	unsigned int *s;
	int length;
	int n;

	if(! MLGetUTF32Function(l, &s, &length, &n))
	{ /* Unable to read the function from the link */ }

	/* ... */

	MLReleaseUTF32Function(l, s, length);
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLReleaseUTF32Symbol(), paclet:/ref/c/MLReleaseUTF32Symbol])  ▪  (NonWLLink[MLGetFunction(), paclet:/ref/c/MLGetFunction])  ▪  (NonWLLink[MLGetUCS2Function(), paclet:/ref/c/MLGetUCS2Function])  ▪  (NonWLLink[MLGetUTF8Function(), paclet:/ref/c/MLGetUTF8Function])  ▪  (NonWLLink[MLGetUTF16Function(), paclet:/ref/c/MLGetUTF16Function])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Manipulating Expressions in External Programs, paclet:tutorial/ManipulatingExpressionsInExternalPrograms])}, {▪(RefLinkPlain[Handling Lists, Arrays, and Other Expressions, paclet:tutorial/HandlingListsArraysAndOtherExpressions])}})}})