WSSetEnvIDString()

int WSSetEnvIDString(WSENV env,const char *eid)

sets the WSTP 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. WSSetEnvIDString() sets the application's identification string and WSTP will exchange that string with any remote WSTP connection during WSActivate() time.
  • WSSetEnvIDString() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • WSSetEnvIDString() is declared in the WSTP header file wstp.h.

Examples

Basic Examples  (1)

#include "wstp.h"

int main()
{
    WSENV env;

    env = WSInitialize((WSEnvironmentParameter)0);
    if(env == (WSENV)0)
        { /* unable to initialize the WSTP environment */ }

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

    /* ... */    

    WSDeinitialize(env);
    return 0;
}

See Also

WSGetLinkedEnvIDString()

Tutorials