WSReleaseLinkName()

void WSReleaseLinkName( WSLINK l , const char * n )

releases memory allocated by WSLinkName() to store the link name n for the WSTP connection specified by l.

Details

  • The memory used by the name n must have been created by a call to WSLinkName().
  • WSReleaseLinkName() is declared in the WSTP header file wstp.h.

Examples

Basic Examples  (1)

#include "wstp.h"

int main(int argc, char **argv)
{
    WSENV env;
    WSLINK link;
    int error;
    const char *name;

    env = WSInitialize((WSEnvironmentParameter)0);
    if(env == (WSENV)0)
    { /* Unable to create the WSTP environment object */ }

    link = WSOpenArgcArgv(env, argc, argv, &error);
    if(link == (WSLINK)0 || error != WSEOK)
    { /* Unable to create link */ }

    WSActivate(link);

    name = WSLinkName(link);
    if(name == (const char *)0)
    { /* Unable to get the link name */ }

    /* ... */

    WSReleaseLinkName(link, name);

    /* ... */

    WSClose(link);
    WSDeinitialize(env);
    return 0;
}

See Also

WSLinkName()  WSReleaseUCS2LinkName()  WSReleaseUTF16LinkName()  WSReleaseUTF32LinkName()  WSReleaseUTF8LinkName()

Tutorials