internal void RegisterWidgetCreatingFunction(ref string widgetName) { CreateWidgetFunctionDelegate newDelegate = new CreateWidgetFunctionDelegate(WidgetCreateFunction); System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate <System.Delegate>(newDelegate); CreateWidgetFunction createWidgetFunction = new CreateWidgetFunction(ip, true); Interop.WidgetApplication.WidgetApplication_RegisterWidgetCreatingFunction(swigCPtr, ref widgetName, CreateWidgetFunction.getCPtr(createWidgetFunction)); if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } }