MLLoopbackOpen (C Function)

MLLoopbackOpen has been replaced by WSLoopbackOpen.

MLINK MLLoopbackOpen(MLENV env,int *errno)

opens a loopback MathLink connection.


  • In an external program set up with MathLink templates, the environment stdenv should be used.
  • You can use loopback links to effectively store Wolfram Language expressions.
  • Any expressions written to a loopback link can be read from the same link object.
  • MLLoopbackOpen() stores its error results in errno. If no error occurs errno contains MLEOK.
  • MLLoopbackOpen() is declared in the MathLink header file mathlink.h.


Basic Examples  (1)

#include "mathlink.h"

/* read data from a link, store it in a loopback link, and return the loopback link */

MLINK f(MLENV env, MLINK link)
    MLINK loopbacklink;
    int error;

    loopbacklink = MLLoopbackOpen(env, &error);
    if(loopbacklink == (MLINK)0 || error != MLEOK)
        { /* unable to create loopbacklink */ }

    if(! MLTransferExpression(loopbacklink, link))
        { /* unable to transfer an expression from link to
loopbacklink */ }

    return loopbacklink;