public static void OrthancPluginSetDescription(ref OrthancPluginContext context, string description) { _OrthancPluginSetPluginProperty pr = new _OrthancPluginSetPluginProperty(); pr.plugin = TestPlugin.OrthancPluginGetName(); pr.property = _OrthancPluginProperty._OrthancPluginProperty_Description; pr.value = description; int size = Marshal.SizeOf(typeof(_OrthancPluginSetPluginProperty)); IntPtr ptr = Marshal.AllocHGlobal(size); Marshal.StructureToPtr(pr, ptr, true); try { context.InvokeService(ref context, _OrthancPluginService._OrthancPluginService_SetPluginProperty, ptr); } catch (Exception ex) { OrthancPluginLogError(ref context, ex.ToString()); } finally { Marshal.FreeHGlobal(ptr); } }