WSLinkEnvironment()

WSENV WSLinkEnvironment(WSLINK l)

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

Details

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

Examples

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));
    }
}

Tutorials