![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I have created a plugin for Outlook, I want add ribbon controls to my existing OUtlook plugin. When I Implement "IRibbonExtensibility" Interface in the class that was implemented "_IDTExtensibility2" Interface it throws up the following error message ATL::CComObjectBase' : cannot instantiate abstract class with [ Base=CGrabExplorer ] due to following members: 'HRESULT Office::IRibbonExtensibility::raw_GetCustomUI(BSTR ,BSTR *)' : is abstract I have implemented "GetCustomUI" API and returning S_OK How do i resolve this? Thanks in Advance. -- Message posted via http://www.officekb.com |
Ads |
#2
|
|||
|
|||
![]()
GetCustomUI() returns a string value, specifically a BStr, not S_OK. Does
your declaration look something like this, given that my declaration is from a C# project: [ComImport(), Guid("000C0396-0000-0000-C000-000000000046"), TypeLibType((short)0X1040)] public interface IRibbonExtensibility { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] string GetCustomUI([In(), MarshalAs(UnmanagedType.BStr)] string RibbonID); } -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "KarthikonIT via OfficeKB.com" u54961@uwe wrote in message news:9ffc994f04fcd@uwe... Hi, I have created a plugin for Outlook, I want add ribbon controls to my existing OUtlook plugin. When I Implement "IRibbonExtensibility" Interface in the class that was implemented "_IDTExtensibility2" Interface it throws up the following error message ATL::CComObjectBase' : cannot instantiate abstract class with [ Base=CGrabExplorer ] due to following members: 'HRESULT Office::IRibbonExtensibility::raw_GetCustomUI(BSTR ,BSTR *)' : is abstract I have implemented "GetCustomUI" API and returning S_OK How do i resolve this? Thanks in Advance. -- Message posted via http://www.officekb.com |
#3
|
|||
|
|||
![]()
Hi,
Thx for ur reply, I ve created my plugin in C++, STDMETHOD(GetCustomUI)(BSTR RibbonID, BSTR * RibbonXml) This API will return XML content of the ribbon control in "RibbonXml" parameter so the return value is not a string. My sample works fine but when i implement this "IRibbonExtensibility" interface in my existing Outlook plugin it throws up the error ATL::CComObjectBase' : cannot instantiate abstract class with [ Base=CGrabExplorer ] due to following members: 'HRESULT Office::IRibbonExtensibility::raw_GetCustomUI(BSTR ,BSTR *)' : is abstract" I m implementing this interface in the class which already implmented "_IDTExtensibility2" I ve tried this multiple times but it throws up same error. Thanks.. Ken Slovak - [MVP - Outlook] wrote: GetCustomUI() returns a string value, specifically a BStr, not S_OK. Does your declaration look something like this, given that my declaration is from a C# project: [ComImport(), Guid("000C0396-0000-0000-C000-000000000046"), TypeLibType((short)0X1040)] public interface IRibbonExtensibility { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] string GetCustomUI([In(), MarshalAs(UnmanagedType.BStr)] string RibbonID); } Hi, I have created a plugin for Outlook, I want add ribbon controls to my [quoted text clipped - 18 lines] Thanks in Advance. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...ddins/200912/1 |
#4
|
|||
|
|||
![]()
You definitely have to handle the ribbon callbacks in the same class that
implements extensibility. See if the C++ information for the ribbon at http://blogs.msdn.com/jensenh/archiv...c-and-atl.aspx helps you at all. I don't do C++ addins, so I can't help more specifically. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "KarthikonIT via OfficeKB.com" u54961@uwe wrote in message news:a00a15eef9208@uwe... Hi, Thx for ur reply, I ve created my plugin in C++, STDMETHOD(GetCustomUI)(BSTR RibbonID, BSTR * RibbonXml) This API will return XML content of the ribbon control in "RibbonXml" parameter so the return value is not a string. My sample works fine but when i implement this "IRibbonExtensibility" interface in my existing Outlook plugin it throws up the error ATL::CComObjectBase' : cannot instantiate abstract class with [ Base=CGrabExplorer ] due to following members: 'HRESULT Office::IRibbonExtensibility::raw_GetCustomUI(BSTR ,BSTR *)' : is abstract" I m implementing this interface in the class which already implmented "_IDTExtensibility2" I ve tried this multiple times but it throws up same error. Thanks.. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Instantiate Internet Explorer in Outlook VBA | Pierre Scerri | Outlook and VBA | 0 | July 16th 08 02:54 PM |
Error class not registered in Outlook 07 | Dudi | Outlook - General Queries | 1 | January 4th 08 11:24 AM |
Error message: Class not registered | Dale | Outlook - Calandaring | 1 | November 26th 07 01:22 AM |
CDO Error (class not registered) | tony | Outlook and VBA | 1 | August 14th 07 06:16 PM |
Exception, error retrieving COM class factory... | [email protected] | Add-ins for Outlook | 0 | June 22nd 06 12:23 PM |