Determine if C++ application is running as a UWP app, with legacy support

My first thought was to use GetPackageFamilyName() and look for ERROR_SUCCESS vs APPMODEL_ERROR_NO_PACKAGE. But, I need to support Windows 7, which makes GetPackageFamilyName() unusable. Is ther...