How to get Process name from process id in windows through C++ without enumerating process? -
i need process name process id in windows find process names associated logged event. able execution process id logged event. process handle required input use getprocessimagefilename()
method. it's not able process handle logged event.
in duplicate question, talks running process. need not running process since talks logged event. & have doubt of whether processid vs processname combination unique or not in windows. need consider also..
i expect there must structure map process id process name. there structure so? or other methods process image name process id?
i need process name process id in windows find process names associated logged event.
if getting process id log, valid if original process still running. otherwise, id no longer valid process name. if process has exited before read log, bets off.
i need not running process since talks logged event.
then out of luck, if original process name not logged.
i have doubt of whether processid vs processname combination unique or not in windows.
a process id unique while being used running process. once process ends, process id no longer valid, , can re-used subsequent new process.
i expect there must structure map process id process name.
yes, running process. can pass process id openprocess()
. if successful, return handle
running process. can pass handle
getmodulefilename()
, getprocessimagefilename()
, or queryfullprocessimagename()
, depending on os version , permissions able gain openprocess()
.
Comments
Post a Comment