OpenersNotesSection(Spacer1)Details

The ID number is suitable for use with (NonWLLink[MLFromLinkID(), paclet:ref/c/MLFromLinkID]).

MLToLinkID() returns 0 in the event of an error and a positive integer value otherwise.

MLToLinkID() is declared in the MathLink header file mathlink.h.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include "mathlink.h"

/* get the link id number */

void f(MLINK lp)
{
	long idnumber;

	idnumber = MLToLinkID(lp);
	if(idnumber == 0)
		{ /* unable to get the link id number */ }
}

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