OpenersNotesSection(Spacer1)Details

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

WSReleaseUTF32LinkName() is declared in the WSTP header file (RefLink[wstp.h, paclet:ref/file/wstp.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include "wstp.h"

/* A function for reading a name for a link */

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

	name = WSUTF32LinkName(l, &length);

	/* We check for length <= 1 here because WSUTF32LinkName
	returns a string with a byte order mark */

	if(name == (const unsigned int *)0 || length <= 1)
	{ /* Unable to get the name of the link */ }

	/* ... */

	WSReleaseUTF32LinkName(l, name, length);
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[WSUTF32LinkName(), paclet:ref/c/WSUTF32LinkName])  ▪  (NonWLLink[WSReleaseLinkName(), paclet:ref/c/WSReleaseLinkName])  ▪  (NonWLLink[WSReleaseUCS2LinkName(), paclet:ref/c/WSReleaseUCS2LinkName])  ▪  (NonWLLink[WSReleaseUTF16LinkName(), paclet:ref/c/WSReleaseUTF16LinkName])  ▪  (NonWLLink[WSReleaseUTF8LinkName(), paclet:ref/c/WSReleaseUTF8LinkName])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[WSTP C API Developer Guide (Mac OS X), paclet:tutorial/WSTPDeveloperGuide-MacintoshOverview])}, {▪(RefLinkPlain[WSTP C API Developer Guide (Unix and Linux), paclet:tutorial/WSTPDeveloperGuide-UnixOverview])}, {▪(RefLinkPlain[WSTP C API Developer Guide (Windows), paclet:tutorial/WSTPDeveloperGuide-WindowsOverview])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Alphabetical Listing of WSTP C Functions, paclet:guide/AlphabeticalListingOfWSTPCFunctions])}, {▪(RefLinkPlain[WSTP C Language Functions, paclet:guide/WSTPCLanguageFunctions])}})}})