RE: IRibbonExtensibility in unmanaged C++

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Mark,

Currently the Office 2007 is just coming in RTM version so the document
about this is less.

But based on my test, from scratch, the ATL/C++ Wizard for Shared Addin
will not add the default implement for interface IRibbonExtensibility.
So we can just add the implementation to the default class e.g. CConnect.

In VS.NET 2005 IDE, please follow the steps below.
1. Switch to the Class View, right click on the CConnect class
2. Click Add/Implement Interface
3. Complete the Wizard to select the IRibbonExtensibility in the Office 12
Com Lib.

The result should be similar with below.
1. Interface implementaion: public
IDispatchImpl<Office::IRibbonExtensibility,
&__uuidof(Office::IRibbonExtensibility), &Office::LIBID_Office, /* wMajor =
*/ 2, /* wMinor = */ 4>,
2. The header file is similar with below.
#pragma warning( disable : 4278 )
#pragma warning( disable : 4146 )
//The following #import imports the IDTExtensibility2 interface based on
it's LIBID
#import "libid:AC0714F2-3D04-11D1-AE7D-00A0C90F26F4" version("1.0")
lcid("0") raw_interfaces_only named_guids
//The following #import imports the MSO interface based on it's LIBID
#import "libid:2DF8D04C-5BFA-101B-BDE5-00AA0044DE52" version("2.4")
lcid("0") raw_interfaces_only named_guids auto_rename
#pragma warning( default : 4146 )
#pragma warning( default : 4278 )

If you still have any concern, please let me know.

Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • RE: IRibbonExtensibility in unmanaged C++
    ... I've based my code on the sample code in KB Q230689. ... will not add the default implement for interface IRibbonExtensibility. ... Switch to the Class View, right click on the CConnect class ... //The following #import imports the MSO interface based on it's LIBID ...
    (microsoft.public.office.developer.com.add_ins)
  • Re: Using same interfaces for in-proc vs. out-proc
    ... only point to one LIBID at a time. ... LIBIDs don't participate in server activation in any ... That's why an interface IID needs to point to a LIBID in the ... clients like VBA that consult type libraries during compilation: ...
    (microsoft.public.vc.atl)
  • Re: ASA 5505 ASDM Startup Wizard - does it work at all?
    ... ASDM is too difficult for me. ... Select from the menu: Wizards - Startup Wizard ... Interface vlan1 ... followed by an error message "ASDM is unable to contact the ASA" and ...
    (comp.dcom.sys.cisco)
  • Re: Using same interfaces for in-proc vs. out-proc
    ... Also LIBID and all UDTs and interface/coclass GUIDs are different. ... IDL and have them differ only by LIBID so that we can somehow ... If you want to share the same interface definitions between two modules, build a standalone TLB file and treat it carefully as a shared resource for deployment purposes. ...
    (microsoft.public.vc.atl)
  • Re: Create a VB6 SP5 ActiveX component from a form?
    ... > from a VB form that has a simple user interface. ... Add-Ins/Add-In Manager, scroll down to 'VB6 ActiveX Ctrl Interface Wizard', ... Open the usercontrol designer and plop a few controls on its surface. ...
    (microsoft.public.vb.com)