This feature is not supported on the Wolfram Cloud.

long WSToLinkID(WSLINK link)
returns the ID number of link.


  • The ID number is suitable for use with WSFromLinkID().
  • WSToLinkID() returns 0 in the event of an error and a positive integer value otherwise.
  • WSToLinkID() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

/* get the link id number */

void f(WSLINK lp)
    long idnumber;

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