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


returns a string of length n encoded in the UTF-32 encoding form representing the name string used to create the WSTP connection specified by l.

DetailsDetails

  • WSUTF32LinkName() allocates memory for the link name that must be released. To release the memory, call WSReleaseUTF32LinkName() on the value returned by the function. If WSUTF32LinkName() returns NULL, do not call WSReleaseUTF32LinkName() on the NULL value.
  • Programs should not modify the contents of the string returned by WSUTF32LinkName().
  • WSUTF32LinkName() returns a string with a platform-appropriate byte order mark.
  • The length of the string n includes the byte order mark.
  • WSTP links are created using a combination of link mode, link protocol, and other options. The link name provides necessary information for the link mode and link protocol used to create the link.
  • WSUTF32LinkName() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

/* A function for getting the name of a link */

void f(WSINK l)
{
    const unsigned int *name;
    int length;

    name = WSUTF32LinkName(l, &length);

    /* We check for length <= 1 because WSUTF32LinkName returns a
    string with a byte order mark. */

    if(name == (const unsigned int *)0 || length <= 1)
    { /* Unable to read the name of the link */ }

    /* ... */

    WSReleaseUTF32LinkName(l, name, length);
}
Introduced in 2014
(10.0)