Matthew van Eerde's web log
I am a Software Development Engineer in Test working for the Windows Sound team. You can contact me via email: mateer at microsoft dot com
Last time I talked about enumerating audio sessions and showed an example which listed several Desktop apps and one Windows Store app.
It's possible to guess that this is a Windows Store app by the presence of the WWAHost.exe string in the session instance identifier. Don't rely on this, though; the session identifiers are opaque strings, and their formula can change at any time.
We were able to get some additional information on the Desktop apps by enumerating their top-level windows and reading the window text. But how do we get more information on the Windows Store app? And how do we even know it's a Windows Store app without cracking the session identifier?
By using the Application Model APIs - for example, GetPackageFullName.
... get a process ID...
OpenProcess(PROCESS_QUERY_LIMITED_USER_INFORMATION, FALSE, pid);
if APPMODEL_ERROR_NO_PACKAGE then the process has no associated package and is therefore not a Windows Store app.
Updated sample output:
Source and binaries attached.