MLUTF8LinkName (C 函数)
MLUTF8LinkName 已经被 WSUTF8LinkName 所取代.
const unsigned char * MLUTF8LinkName(MLINK l, int *n)
returns a string of length n encoded in the UTF-8 encoding form representing the name string used to create the MathLink connection specified by l.
更多信息

- MLUTF8LinkName() allocates memory for the link name string that must be released. To release the memory, call MLReleaseUTF8LinkName() on the value returned by the function. If MLUTF8LinkName() returns NULL, do not call MLReleaseUTF8LinkName() on the NULL value.
- Programs should not modify the contents of the string returned by MLUTF8LinkName().
- MathLink 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.
- MLUTF8LinkName() is declared in the MathLink header file mathlink.h.
范例
基本范例 (1)
#include "mathlink.h"
/* A function for reading a link's name */
void f(MLINK l)
{
const unsigned char *name;
int length;
name = MLUTF8LinkName(l, &length);
if(name == (const unsigned char *)0 || length == 0)
{ /* Unable to get the name of the link */ }
/* ... */
MLReleaseUTF8LinkName(l, name, length);
}