public void OnLoaded() { unsafe { IntPtr hhandle = Marshal.GetHINSTANCE(typeof(EngineWrapper).Module); _engine.Init(hhandle.ToPointer(), _host.ChildHwnd.ToPointer(), (int)this.ActualWidth, (int)this.ActualHeight); } }