Overview:
I need to detect if a given application is running in WinRT (aka "Metro") mode, by process/PID. Is there a good way of doing this?
Failed attempts and observations:
- OpenProcess() and call Call GetPackageId() checking for != APPMODEL_ERROR_NO_PACKAGE: This seems to work for some processes while others such as Chrome when running in Metro mode fail the check.
- Metro apps appear always be hosted (e.g. their parent) by svchost.exe
Any ideas? Please omit any "Don't do that" or "Why?" responses as they are not helpful to this particular question.