OpenersNotesSection(Spacer1)Details

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

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

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

void f(MLENV env, long id)
{
	MLINK lp;

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

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

	/* ... */
}

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