cannot instantiate abstract class - Compiler error.

Status
Not open for further replies.
K

KarthikonIT

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::CComObject<Base>' : 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.

 
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);

}

"KarthikonIT " <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::CComObject<Base>' : 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.

> >
>
 
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::CComObject<Base>' : 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..
- 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.



200912
 
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/archive/2006/12/08/using-ribbonx-with-c-and-atl.aspx

helps you at all. I don't do C++ addins, so I can't help more specifically.

"KarthikonIT " <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::CComObject<Base>' : 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..
>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P Cannot understand how to use Favorites Using Outlook 4
U When opening shared Calendar "The set of folders cannot be opened" Using Outlook 0
J Cannot edit a calendar event received as an invitation Using Outlook 2
humility36 Cannot move emails to archive - 440 error Outlook VBA and Custom Forms 1
L I Cannot Sign Into My Outlook Account? Outlook VBA and Custom Forms 0
CWM550 This rule has a condition that the server cannot process? Using Outlook 1
U Outlook on the iPhone cannot approve filtered Emails Using Outlook 0
Horsepower Cannot delete gmail in iPhone Outlook outbox Using Outlook 1
K Daily Task List Minimized Cannot Display Using Outlook 5
O The linked image cannot be displayed Using Outlook 2
C "The linked image cannot be displayed. The file may have been moved, renamed, or deleted. Verify that the link points to the correct file location" Using Outlook 1
B IMAP server rejects sent email - cannot deliver messages Using Outlook 2
T Outlook 2021 Cannot open attachments Outlook DeskTop 2021 Using Outlook 0
S Cannot print Contacts Using Outlook 7
J VBA Cannot programmatically input or change Value for User Defined field Using Outlook 1
T Outlook 2010 Cannot edit Calendar entries in OL 2010. Using Outlook 1
O Cannot expand the folder. The set of folders cannot be opened. You do not have permission to log on. Using Outlook 1
N Item cannot be saved because it was modified by another user or window, and, Item could not be moved... Using Outlook 0
D Cannot populate certain UserProperties in Outlook from Excel Outlook VBA and Custom Forms 2
D Outlook 2016 64bit, Cannot Save in 'HTML', format Using Outlook 1
D cannot view emails in View pane (in the right pane), I only see one line or nothing Using Outlook 21
M Cannot read the calendar Using Outlook 9
T The Linked Image Cannot Be Displayed in Outlook Using Outlook 7
D Outlook 2016 Outlook Error Msg "The operation cannot be performed ..." How to Stop it Using Outlook 4
S Custom Field Cannot Be Displayed In Views Outlook VBA and Custom Forms 2
G Cannot Move Autocomplete File to New Computer Using Outlook 15
rubaboo The vew cannot be found Outlook VBA and Custom Forms 0
A Cannot copy this folder because it may contain private items Using Outlook 0
L Cannot open PST file for first session each day Using Outlook 6
David in Mississippi New (Feb 2020) install of Outlook 365 - Cannot specify PST for different accounts Using Outlook 0
Marc2019 Need help please! Cannot Setup my outlook email account on my Mac Outlook 2011 Using Outlook.com accounts in Outlook 2
noshairwan Registry cannot be found, Outlook Security Using Outlook 2
Marc2019 Cannot input Vietnamese Characters on my MSOutlook 2016 in Windows 7 Using Outlook 0
T Cannot remove needless PST Using Outlook 1
Marc2019 Cannot setup Outlook Account on Mac Os 10.6.8 Using Outlook 3
N pst files are recreating automaticaly and cannot be deleted Using Outlook 5
Mark Foley Cannot enable add-in in outlook 2010 Using Outlook 0
T "cannot find the calendar folder for this item" - calendar items stuck in outbox Using Outlook 0
A Created a new user account and the local account cannot see email Using Outlook 3
iwshim outlook 2013 - I cannot see the "Manage Add-ins" Using Outlook 2
T Cannot connect to main BT email account, sub accts okay Using Outlook 0
O The page that you are trying to access cannot be loaded. Using Outlook 0
M Daily Task List Minimized Cannot Display Using Outlook 2
geofferyh Cannot get Macro to SAVE more than one message attachment??? Outlook VBA and Custom Forms 5
DariTrevino MIcrosoft Outlook PST file cannot repair Using Outlook 1
B One email cannot be sent or received (but leaves outbox!) Using Outlook 1
C Outlook 2016 cannot delete, email showing in root Exchange Server Administration 5
S Outlook.com cannot edit some contacts Using Outlook.com accounts in Outlook 5
B Search: Cannot find which Folder Contains a Message Using Outlook 3
C Outlook - cannot save subject line changes Using Outlook 2

Similar threads

Back
Top