MLSetEnvIDString()

MLSetEnvIDString has been replaced by WSSetEnvIDString.

int MLSetEnvIDString(MLENV env,const char *eid)

sets the MathLink environment identification string to eid.

Details

  • 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.

Examples

Basic Examples  (1)

#include "mathlink.h"

int main()
{
    MLENV env;

    env = MLInitialize((MLEnvironmentParameter)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 */ }

    /* ... */    

    MLDeinitialize(env);
    return 0;
}

See Also

MLGetLinkedEnvIDString()