MLLinkEnvironment (C Function)

MLLinkEnvironment has been replaced by WSLinkEnvironment.

MLENV MLLinkEnvironment(MLINK l)

gets the MathLink environment object that created the MathLink connection specified by l.

Details

  • MLLinkEnvironment() returns (MLENV)0 on error.
  • MLLinkEnvironment() is declared in the MathLink header file mathlink.h.

Examples

Basic Examples  (1)

#include <stdio.h>
#include "mathlink.h"

/* A function for printing MathLink error messages */

void f(MLINK l)
{
    int error;

    if((error = MLError(l),error) != MLEOK)
    {
        printf("MathLink error: %s\n", MLErrorString(
            MLLinkEnvironment(l), error));
    }
}