Get process id of a running metro app

前端 未结 4 1944
遇见更好的自我
遇见更好的自我 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:38

    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
    

提交回复
热议问题