I want to get the process ID of a running Metro application programmatically using C ++ code from another process. I have static information about this application, such as name, full name, etc. What is an API? I canβt use EnumProcess because the running Metro application runs in the WWAHost.exe container of the application, so I canβt know which of the running WWAHost.exe processes actually launches my Metro application.
In the process handler, I noticed that the current directory of the WWAHost.exe process running my Metro application is similar to the installation location of the Metro application. Could this be a differentiating factor between all running application containers? If so, what is the way to get the current directory of another process?
To update, I have a solution regarding this in the msdn forums. Here is the link:
http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/c9665bf4-00e4-476c-badb-37126efd3f4b/
But the solution uses an undocumented mechanism for Windows to get the current directory of another process. I would like to use this solution only if there is no other way.
source share