This feature is not supported on the Wolfram Cloud.

WSENV WSLinkEnvironment(WSLINK l)
gets the WSTP environment object that created the WSTP connection specified by l.


  • WSLinkEnvironment() returns (WSENV)0 on error.
  • WSLinkEnvironment() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

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

/* A function for printing WSTP error messages */

void f(WSLINK l)
    int error;

    if((error = WSError(l),error) != WSEOK)
        printf("WSTP error: %s\n", WSErrorString(
            WSLinkEnvironment(l), error));
Translate this page: