COM aggregate requirements for my custom IRibbonExtensibility implementation?

We have a split Connect class that instantiates the addin kernel from another assembly. Our architectural project is to leave the user interface and business logic separate from the download module (= Connect class), but the limitations of the general Addin create problems.

what we did in Connect.cs:

[GuidAttribute("XYZ"), ProgId("XYZ")] public class Connect : Object, IDTExtensibility2, ICustomQueryInterface { ... CustomQueryInterfaceResult ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) { if (iid.Equals(new Guid("000C0396-0000-0000-C000-000000000046"))) { ppv = Marshal.GetComInterfaceForObject( UIObject, typeof(IRibbonExtensibility), CustomQueryInterfaceMode.Ignore); return CustomQueryInterfaceResult.Handled; } ppv = IntPtr.Zero; return CustomQueryInterfaceResult.NotHandled; } } 

what RibbonUI looks like:

 public interface IOfficeFluentUI : IRibbonExtensibility { ... } public class OfficeFluentUI : OfficeUIBase, IOfficeFluentUI { ... public string GetCustomUI(string RibbonID) { ... } } 

The GetInterface function works, it receives the com interface, but, unfortunately, the GetCustomUI function does not call. What are we wrong? Thanks so much for any help.

[edit] We already know the " Managed COM Aggregation " and " ICustomQueryInterface " articles, unfortunately they really didn't help.

+2
c # aggregation com shared-addin
source share

No one has answered this question yet.

See similar questions:

6
Managed Aggregation COM

or similar:

684
LINQ Aggregate Algorithm Explained
355
What is the difference between association, aggregation and composition?
3
The standard COM marshaler does not work with REGDB_E_IIDNOTREG
3
Calling a COM object from an STA thread calls TYPE_E_LIBNOTRector on some machines
one
HRESULT exception: 0x8002801D (TYPE_E_LIBNOTRector)
one
Error using Microssoft.office.interop
0
Export to Excel C # Error
0
CastError when calling Excel functions in a thread?
0
Do all canonical com system interfaces end in -0000-0000-c000-000000000046?
-one
COM call from WPF, getting E_NOINTERFACE even using STAThread, but works in console application

All Articles