/// <summary> /// Returns runtime class name for a specific object /// </summary> internal static string GetRuntimeClassName(Object obj) { #if ENABLE_MIN_WINRT System.IntPtr pWinRTItf = default(IntPtr); try { pWinRTItf = McgMarshal.ObjectToIInspectable(obj); if (pWinRTItf == default(IntPtr)) { return(String.Empty); } else { return(GetRuntimeClassName(pWinRTItf)); } } finally { if (pWinRTItf != default(IntPtr)) { McgMarshal.ComRelease(pWinRTItf); } } #else return(string.Empty); #endif }