internal static CfxApp Wrap(IntPtr nativePtr) { if (nativePtr == IntPtr.Zero) { return(null); } var handlePtr = CfxApi.cfx_app_get_gc_handle(nativePtr); return((CfxApp)System.Runtime.InteropServices.GCHandle.FromIntPtr(handlePtr).Target); }