WSToLinkID (C Function)

long WSToLinkID(WSLINK link)

returns the ID number of link.

Details

  • 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.

Examples

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 */ }
}