This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
MathLink C Function


long MLToLinkID(MLINK link)
returns the ID number of link.
  • 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.
#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 */ }