Getting HWND off of CoreWindow object in UWP
This COM interface is only directly accessible to C++ code. In C# you have to declare it yourself and make it match the interface declaration in C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\winrt\CoreWindow.idl. Like this: using System.Runtime.InteropServices; … [ComImport, Guid(“45D64A29-A63E-4CB6-B498-5781D298CB4F”)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] interface ICoreWindowInterop { IntPtr WindowHandle { get; } bool MessageHandled { set; } } Obtaining the interface … Read more