OpenersNotesSection(Spacer1)Details

The memory allocated to store the link name n must have been allocated by a call to (NonWLLink[MLUTF8LinkName(), paclet:/ref/c/MLUTF8LinkName]).

MLReleaseUTF8LinkName() 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 the name of a link */

void f(MLINK l)
{
	const unsigned char *name;
	int length;

	name = MLUTF8LinkName(l, &length);
	if(name == (const unsigned char *)0 || length == 0)
	{ /* Unable to get the name of the link */ }

	/* ... */

	MLReleaseUTF8LinkName(l, name, length);
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLUTF8LinkName(), paclet:/ref/c/MLUTF8LinkName])  ▪  (NonWLLink[MLReleaseLinkName(), paclet:/ref/c/MLReleaseLinkName])  ▪  (NonWLLink[MLReleaseUCS2LinkName(), paclet:/ref/c/MLReleaseUCS2LinkName])  ▪  (NonWLLink[MLReleaseUTF16LinkName(), paclet:/ref/c/MLReleaseUTF16LinkName])  ▪  (NonWLLink[MLReleaseUTF32LinkName(), paclet:/ref/c/MLReleaseUTF32LinkName])}})}})