c# and ribbonbar

 

Hi, Jason, could you help me create a ribbonbar or a commandgroup in c#? I tried, but the var is null.

SolidEdgeFramework.ISolidEdgeCommandBar cmdBar;

            IntPtr i,j;

            Guid g;

 

            g = typeof(SolidEdgeFramework.ISECommand).GUID;

 

            //i=Marshal.GetIDispatchForObject(cmd);

            i = Marshal.GetIUnknownForObject(cmd);

            Marshal.QueryInterface(i, ref g, out j);

cmdBar = (ISolidEdgeCommandBar)Marshal.GetIUnknownForObject(j);

 

Thanks!

 

Posted by: assassin 007
Post date: 6/8/2009 6:58:26 AM

2 REPLIES

RE: c# and ribbonbar

c++is so easy, hr = m_cmd->QueryInterface(&m_ribbonBar), but in C#, ....?

 

Posted by: assassin 007
Post date: 6/8/2009 7:09:50 AM

RE: c# and ribbonbar

Hi, somebody can help me? a vb program is ok.Thanks!

 

Posted by: assassin 007
Post date: 6/17/2009 9:38:46 AM