首页
社区
课程
招聘
[求助][求助]请问,知道hProcess后如何知道对应的进程句柄?
发表于: 2007-10-18 12:30 4504

[求助][求助]请问,知道hProcess后如何知道对应的进程句柄?

2007-10-18 12:30
4504
【求助】请问,知道hProcess后如何知道对应的进程句柄?
有什么API可以得到吗?
知道句柄可以得到hprocess这个已经是知道的了,如何做反过来的操作,由hProcess知道句柄?

[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 325
活跃值: (97)
能力值: ( LV13,RANK:530 )
在线值:
发帖
回帖
粉丝
2
Retrieves the process identifier of the specified process.

DWORD WINAPI GetProcessId(
  HANDLE Process
);

Parameters
Process
[in] A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION access right.
Return Value
If the function succeeds, the return value is the process identifier of the specified process.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks
Until a process terminates, its process identifier uniquely identifies it on the system. For more information about access rights, see Process Security and Access Rights.

Requirements
Client Requires Windows Vista or Windows XP SP1.
Server Requires Windows Server "Longhorn" or Windows Server 2003.
Header Declared in Winbase.h; include Windows.h.

Library Use Kernel32.lib.

DLL Requires Kernel32.dll.  

See Also
GetCurrentProcessId
GetProcessIdOfThread
GetThreadId
Processes
2007-10-18 12:40
0
雪    币: 66
活跃值: (16)
能力值: ( LV8,RANK:130 )
在线值:
发帖
回帖
粉丝
3
zwqueryinformationprocess is win2k.
2007-10-19 19:09
0
游客
登录 | 注册 方可回帖
返回
//