I have a Windows Universal app for Windows/WinPhone 8.1 which uses WinRT runtime components for background processing. There is a small difference between Win and WP versions in background processing, so I'd like to take this into account. Yet WinRT component is compiled only for WinRT (and two projects with one codebase use it), so I can't use predefined constants WINDOWS_APP and WINDOWS_PHONE_APP - it will always be WINDOWS_APP .
But maybe there is a way to dynamically distinguish Win from WinPhone environment in runtime?