How to determine if a Windows Metro application is running during a process?

I am developing a library and I would like to know if it works in a Metro style application to selectively disable / enable some features. Is it possible?

+4
source share
2 answers

You can use the IMetroMode interface to check if your library has been loaded inside the Metro style application. Call the GetMonitorMode() method, if pMode will contain MMM_METRO , then you will be sure that you are working in the Metro application.

+2
source

Here is a simple test:

 if (WinJS) { // WinJS exists in global if in WinRT app } 
0
source

All Articles