Added the ability to know if an app is called by WMain or by another app