[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Winapi - a minimal but useful Windows API binding
- From: KHMan <keinhong@...>
- Date: Sun, 12 Jun 2011 21:08:29 +0800
On 6/12/2011 8:54 PM, Lorenzo Donati wrote:
On 12/06/2011 13.18, KHMan wrote:
On 6/12/2011 5:52 PM, steve donovan wrote:
On Sun, Jun 12, 2011 at 11:06 AM, Lorenzo Donati wrote:
Add a method path() to return the actual process path in the file
don't know if this is easy to do (maybe not, since autoit doesn't
but it could be possible since Sysinternals' "ProcessExplorer"
Ah, I see what you mean: the existing get_process_name() method
the exe name but not the full path. I will investigate this
Are you sure?
From  it seems that GetModuleFileNameW is just the Unicode
version of GetModuleFileName. Excerpt from  (emphasis mine):
"Retrieves the fully-qualified path for the file that contains the
specified module. THE MODULE MUST HAVE BEEN LOADED BY THE CURRENT
The current process here is the lua interpreter running the script
where winapi's get_processes() is called. So this shouldn't be
able to return the path of an arbitrary process active on the
system and whose pid is returned by get_processes().
Am I missing something?
Oh, you were talking about the second part of that paragraph -- I
was thinking about the first part of that paragraph. My bad :-)
Come to think of it, Cygwin provides winexename in its /proc
The MSDN link you provided already points to the solution, which
seems to be GetModuleFileNameEx. But it means going into security
rights issues... I'll wait for someone else to do this, ha ha.
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia