OpenersNotesSection(Spacer1)Details

If no link object in the environment env has the ID number inumb, WSFromLinkID() returns ((NonWLLink[WSLINK, paclet:ref/c/WSLINK]))0.

WSFromLinkID() 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"

/* read data from the link represented by id */

void f(WSENV env, long id)
{
	WSLINK lp;

	lp = WSFromLinkID(env, id);
	if(lp == (WSLINK)0)
		{ /* unable to get the link from the id number */ }

	/* determine the type of data on lp */
	switch(WSGetNext(lp))
	{
		/* ... */
	}

	/* ... */
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[WSToLinkID(), paclet:ref/c/WSToLinkID])}})}})

({{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 Connection Management, paclet:guide/WSTPConnectionManagement])}})}})