WSPutUTF16Symbol (C 函数)
int WSPutUTF16Symbol(WSLINK link,const unsigned short *s,int len)
把由 s 给定名称且具有长度 len 的符号写入由 link 指定的 WSTP 连接.
范例
基本范例 (1)
#include "wstp.h"
/* send the symbol $InstallationDirectory to a link */
void f(WSLINK lp)
{
unsigned short symb[23];
symb[0] = 0xFEFF;
symb[1] = '$';
symb[2] = 'I';
symb[3] = 'n';
symb[4] = 's';
symb[5] = 't';
symb[6] = 'a';
symb[7] = 'l';
symb[8] = 'l';
symb[9] = 'a';
symb[10] = 't';
symb[11] = 'i';
symb[12] = 'o';
symb[13] = 'n';
symb[14] = 'D';
symb[15] = 'i';
symb[16] = 'r';
symb[17] = 'e';
symb[18] = 'c';
symb[19] = 't';
symb[20] = 'o';
symb[21] = 'r';
symb[22] = 'y';
if(! WSPutUTF16Symbol(lp, (const unsigned short *)symb, 23))
{ /* unable to put the symbol to lp */ }
}