Get process id of a running metro app

前端 未结 4 1943
遇见更好的自我
遇见更好的自我 2021-01-25 23:01

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

4条回答
  •  [愿得一人]
    2021-01-25 23:26

    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...

提交回复
热议问题