PROCESS_INFORMATION Structure

本文介绍了Windows API中的PROCESS_INFORMATION结构,该结构用于存储新创建进程及其主线程的信息,包括进程句柄、线程句柄、进程ID及线程ID。这些信息常被用于进程管理和调试。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

PROCESS_INFORMATION Structure

Contains information about a newly created process and its primary thread. It is used with the CreateProcess, CreateProcessAsUser, CreateProcessWithLogonW, or CreateProcessWithTokenW function.

typedef struct _PROCESS_INFORMATION {
HANDLE hProcess;
HANDLE hThread;
DWORD dwProcessId;
DWORD dwThreadId;
} PROCESS_INFORMATION,
*LPPROCESS_INFORMATION;
Members
hProcess

A handle to the newly created process. The handle is used to specify the process in all functions that perform operations on the process object.

hThread

A handle to the primary thread of the newly created process. The handle is used to specify the thread in all functions that perform operations on the thread object.

dwProcessId

A value that can be used to identify a process. The value is valid from the time the process is created until all handles to the process are closed and the process object is freed; at this point, the identifier may be reused.

dwThreadId

A value that can be used to identify a thread. The value is valid from the time the thread is created until all handles to the thread are closed and the thread object is freed; at this point, the identifier may be reused.

 转自:http://msdn2.microsoft.com/en-us/library/ms684873.aspx
其它类似问题都可在此链接中找到答案
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值