MLReleaseEnvIDString has been replaced by WSReleaseEnvIDString.

void MLReleaseEnvIDString(MLINK link,const char *s)

disowns the memory allocated by MLGetLinkedEnvIDString() to store the identification string s.


  • Sometimes it is useful to identify sides of a MathLink connection prior to setting up packet-based communication. Using MLSetEnvIDString() the developer can give an identification string for a program that will be exchanged every time a link is established with another program. MLGetLinkedEnvIDString() retrieves the other side of the link's name.
  • MLReleaseEnvIDString() is declared in the MathLink header file mathlink.h.


Basic Examples  (1)

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

/* read the other side of the link's id string and check that it is "My Remote Program" */

int f(MLINK lp)
    int isCorrectProg;
    const char *envid;

    if(! MLGetLinkedEnvIDString(lp, &envid))
        { /* unable to get remote side id from lp */ }

    isCorrectProg = strcmp(envid, "My Remote Program") == 0;

    MLReleaseEnvIDString(lp, envid, length);

    return isCorrectProg;

See Also

MLGetLinkedEnvIDString()  MLSetEnvIDString()