A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

cannot instantiate abstract class - Compiler error.



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 2nd 09, 01:00 PM posted to microsoft.public.outlook.program_addins
KarthikonIT via OfficeKB.com
external usenet poster
 
Posts: 14
Default cannot instantiate abstract class - Compiler error.

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  
Old December 2nd 09, 02:19 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default cannot instantiate abstract class - Compiler error.

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  
Old December 3rd 09, 02:44 PM posted to microsoft.public.outlook.program_addins
KarthikonIT via OfficeKB.com
external usenet poster
 
Posts: 14
Default cannot instantiate abstract class - Compiler error.

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  
Old December 3rd 09, 04:35 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default cannot instantiate abstract class - Compiler error.

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 09:29 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.