Win32API - 如何从进程句柄获取进程的文件名? [英] Win32API - How to get file name of process from process handle?
本文介绍了Win32API - 如何从进程句柄获取进程的文件名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从进程句柄获取进程的文件名?我使用Win32 C ++(Visual C ++ Express Edition)。
How can I get the file name of process from a process handle? I'm using Win32 C++ (Visual C++ Express Edition).
谢谢。
推荐答案
致电 GetModuleFileNameEx
。可用于Windows 2000.
Call GetModuleFileNameEx
. Available as of Windows 2000.
DWORD WINAPI GetModuleFileNameEx(
__in HANDLE hProcess,
__in_opt HMODULE hModule,
__out LPTSTR lpFilename,
__in DWORD nSize
);
使用 NULL
EXE文件的名称。
Use NULL
for the second parameter to get the name of the EXE file.
这篇关于Win32API - 如何从进程句柄获取进程的文件名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文