WSPutUTF32Symbol (C Function)

int WSPutUTF32Symbol(WSLINK link,const unsigned int *s,int len)

puts a symbol whose name is given by UTF-32 encoded string s with length len to the WSTP connection specified by link.


  • The symbol must be encoded in the UTF-32 character encoding form.
  • The symbol s must start with a byte order mark.
  • The length of the symbol len must include the byte order mark.
  • WSPutUTF32Symbol() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use WSError() to retrieve the error code if WSPutUTF32Symbol() fails.
  • WSPutUTF32Symbol() is declared in the WSTP header file wstp.h.


Basic Examples  (1)

#include "wstp.h"

/* send the symbol $SessionID to a link */

void f(WSLINK lp)
    unsigned int symb[11];

    symb[0] = 0xFEFF;
    symb[1] = '$';
    symb[2] = 'S';
    symb[3] = 'e';
    symb[4] = 's';
    symb[5] = 's';
    symb[6] = 'i';
    symb[7] = 'o';
    symb[8] = 'n';
    symb[9] = 'I';
    symb[10] = 'D';

    if(! WSPutUTF32Symbol(lp, (const unsigned int *)symb, 11))
        { /* unable to send the symbol to lp */ }