天软金融分析.NET函数大全 > TSL函数 > 资源访问函数 > 进程相关函数

SysGetThreadName    

简述
获取线程名称
定义
SysGetThreadName([tid:Integer]):String;
参数
名称类型说明
tidinteger整数,可选参数,线程ID。未指定时默认获取当前线程名称
返回值String获取成功,返回线程名称;否则,返回空字符串
  • 范例

    范例01:获取当前线程名称
    ret:=SysGetThreadName();
    if ret then
      return ret;
    else
      return "获取线程名称失败!";


    范例02:获取指定线程名称
    tid:=18024;//指定线程ID
    ret:=SysGetThreadName(tid);
    if ret then
      return ret;
    else
      return "获取线程名称失败!";

相关