WSReleaseLinkName (C 函数)
void WSReleaseLinkName( WSLINK l , const char * n )
释放由 WSLinkName() 分配的内存,以储存由 l 指定的 WSTP 连接的链接名称 n.
范例
基本范例 (1)
#include "wstp.h"
int main(int argc, char **argv)
{
WSENV env;
WSLINK link;
int error;
const char *name;
env = WSInitialize((WSEnvironmentParameter)0);
if(env == (WSENV)0)
{ /* Unable to create the WSTP environment object */ }
link = WSOpenArgcArgv(env, argc, argv, &error);
if(link == (WSLINK)0 || error != WSEOK)
{ /* Unable to create link */ }
WSActivate(link);
name = WSLinkName(link);
if(name == (const char *)0)
{ /* Unable to get the link name */ }
/* ... */
WSReleaseLinkName(link, name);
/* ... */
WSClose(link);
WSDeinitialize(env);
return 0;
}