WSReleaseLowLevelDeviceName (C 函数)

void WSReleaseLowLevelDeviceName( WSLINK l , const char * n )

释放 WSLowLevelDeviceName() 的内存,以存储由 l 指定的 WSTP 连接的连接名称的底层协议格式.

更多信息

范例

基本范例  (1)

#include "wstp.h"

int main(int argc, char **argv)
{
    WSENV env;
    WSLINK link;
    int error;
    const char *name;
    int apiResult;

    env = WSInitialize((WSEnvironmentParameter)0);
    if(env == (WSENV)0)
    { /* Unable to create environment object */ }

    link = WSOpenArgcArgv(env, argc, argv, &error);
    if(link == (WSLINK)0 || error != WSEOK)
    { /* Unable to create the link object */ }

    WSActivate(link);

    apiResult = WSLowLevelDeviceName(link, &name);
    if(apiResult == 0)
    { /* Failed to retrieve low level name */ }

    /* ... */

    WSReleaseLowLevelDeviceName(link, name);        

    /* .... */

    WSClose(link);
    WSDeinitialize(env);
    return 0;
}