WSReleaseLowLevelDeviceName (C Function)

void WSReleaseLowLevelDeviceName ( WSLINK l , const char * n )

releases memory allocated by WSLowLevelDeviceName() to store the low-level protocol form of the link name of the WSTP connection specified by l.

Details

  • The memory used by the name n must have been created by a call to WSLowLevelDeviceName().
  • WSReleaseLowLevelDeviceName() 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;
    int apiResult;

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

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

    WSActivate(link);

    apiResult = WSLowLevelDeviceName(link, &name);
    if(apiResult == 0)
    { /* Failed to retrieve low level name */ }

    /* ... */

    WSReleaseLowLevelDeviceName(link, name);        

    /* .... */

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