WSLowLevelDeviceName()
This feature is not supported on the Wolfram Cloud.

int WSLowLevelDeviceName(WSLINK l, const char **name)
gets the low-level protocol form of the link name of the WSTP connection specified by l, storing the result in name.

DetailsDetails

  • WSLowLevelDeviceName() allocates memory for the name that must be released by calling WSReleaseLowLevelDeviceName(). If WSLowLevelDeviceName() returns an error, do not call WSReleaseLowLevelDeviceName() on the contents of name.
  • WSLowLevelDeviceName() returns 1 on success and 0 on failure.
  • WSLowLevelDeviceName() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

int main(int argc, char **argv)
{
    WSENV env;
    MLINK 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 == (MLINK)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;
}