This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
MathLink C Function


int MLSetEnvIDString(MLENV env, const char *eid)
sets the MathLink environment identification string to eid.
  • Sometimes it is useful to provide a form of identification to the other side of the link prior to sending any packet data. MLSetEnvIDString() sets the application's identification string and MathLink will exchange that string with any remote MathLink connection during MLActivate() time.
  • MLSetEnvIDString() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • MLSetEnvIDString() is declared in the MathLink header file mathlink.h.
#include "mathlink.h"

int main()
    MLENV env;

    env = MLInitialize((char *)0);
    if(env (MLENV)0)
        { /* unable to initialize the MathLink environment */ }

    if(! MLSetEnvIDString(env, "Your Company Inc. App 25"))
        { /* unable to set app ID string */ }

    /* ... */    

    return 0;