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
Use GetForegroundWindow to get current active window, after that use GetWindowThreadProcessId to get PID of current window, then valid if is a WindowsStore app with IsImmersiveProcess, then GetPackageId to get app package info, like package name, version...