OpenersNotesSection(Spacer1)Details

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

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

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

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

	/* ... */

	WSReleaseUTF8LinkName(l, name, length);
}

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

({{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])}})}})