如何通过其pid获得属于某个进程的线程数? [英] How can i get the number of threads belong to a process by its pid?

查看:346
本文介绍了如何通过其pid获得属于某个进程的线程数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 CreateToolhelp32Snapshot 方法获取其进程的线程数,.

How can i get the number of threads belong to a process by its pid,without using the CreateToolhelp32Snapshot method.

推荐答案

您可以使用WMI并查询具有属性ThreadCount的Win32_Process对象.
You could use WMI and query for the Win32_Process object it has a property ThreadCount.


这篇关于如何通过其pid获得属于某个进程的线程数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆