I want to get the process id of a running Metro app programatically via C++ code, from another process. I have the static information of that app like name, full name etc. What
You want to call GetApplicationUserModelId on each WWAHost process.
The sample application provided allows you to pass in a PID and get back the information about the app. For instance:
C:\src\GetAppInfo\Debug>GetAppInfo.exe 7400
Process 7400 (handle=00000044)
Microsoft.BingWeather_8wekyb3d8bbwe!App