博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
进程handle获取线程_获取进程中的线程列表
阅读量:2516 次
发布时间:2019-05-11

本文共 1079 字,大约阅读时间需要 3 分钟。

进程handle获取线程

进程handle获取线程

The System.Diagnostics namespace contains functions that allow you to manage processes, threads, eventlogs and performance information.

System.Diagnostics命名空间包含允许您管理进程,线程,事件日志和性能信息的函数。

The System.Diagnostics.Process object gives you access to functionality enabling you to manage system processes and threads.

System.Diagnostics.Process对象使您可以访问使您能够管理系统进程和线程的功能。

Add this line to your using list:

将此行添加到您的使用列表:

using System.Diagnostics;
using System.Diagnostics;

You can get a list of ProcessThreads in a process by using the Process.Threads property, which returns a ProcessThreadCollection object.

您可以使用Process.Threads属性获取进程中的ProcessThreads列表,该属性返回ProcessThreadCollection对象。

Here’s a code example for you, assuming that you already have a Process object named theProcess.

这是为您提供的代码示例,假设您已经有一个名为theProcess的Process对象。

ProcessThreadCollection threadlist = theProcess.Threads;foreach(ProcessThread theThread in threadlist){   Console.WriteLine("Thread ID:{0} Priority: {1} Started: {2}",   theThread.Id, theThread.PriorityLevel, theThread.StartTime);}

翻译自:

进程handle获取线程

转载地址:http://bovwd.baihongyu.com/

你可能感兴趣的文章
bzoj1059 [ZJOI2007]矩阵游戏
查看>>
插入返回ibatis 的selectKey 实现插入数据后获得id
查看>>
vim 程序编辑器
查看>>
LIS(单调队列优化 C++ 版)(施工ing)
查看>>
刚接触Vuex
查看>>
四种加载React数据的技术对比(Meteor 转)
查看>>
Airthmetic_Approching
查看>>
操作文本文件
查看>>
公司项目的几个问题
查看>>
解决win7下打开Excel2007,报“向程序发送命令时出现问题”的错误
查看>>
Velocity快速入门教程
查看>>
关于集合常见的问题
查看>>
车牌正则表达式
查看>>
Win form碎知识点
查看>>
避免使用不必要的浮动
查看>>
第一节:ASP.NET开发环境配置
查看>>
sqlserver database常用命令
查看>>
rsync远程同步的基本配置与使用
查看>>
第二天作业
查看>>
访问属性和访问实例变量的区别
查看>>