View Single Post
  #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

Ads