WSReleaseUCS2LinkName (C 函数)
void WSReleaseUCS2LinkName(WSLINK l, const unsigned short *n, int v)
释放由 WSUCS2LinkName() 分配的内存,以储存长度为 v 的 UCS2 编码的链接名称 n.
更多信息
- 用于储存连接名称 n 的内存肯定已在调用 WSUCS2LinkName() 时被分配.
- WSTP 的标头文件 wstp.h 已对 WSReleaseUCS2LinkName() 作出声明.
范例
基本范例 (1)
#include "wstp.h"
/* A function for reading the name of a link */
void f(WSLINK l)
{
const unsigned short *name;
int length;
name = WSUCS2LinkName(l, &length);
if(name == (const unsigned short *)0 || length == 0)
{ /* Unable to retrieve the link name */ }
/* ... */
WSReleaseUCS2LinkName(l, name, length);
}
相关指南
历史
2014年引入 (10.0)