Book a Demo

Author Topic: Generate C++ Addin  (Read 3377 times)

donk15121984

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Generate C++ Addin
« on: October 06, 2006, 01:03:46 am »
Hi @ all,
I have a problem when creating an C++ Addin. I have no idea to start. I need an addin with an easy menu. Could you give me a short expression how to create an addin in Visual Studio C++. My problem is that a can't register for COM interop and that my Regkey could not find.


MattAdamson

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Generate C++ Addin
« Reply #1 on: October 12, 2006, 11:28:47 pm »
I don't understand why you need to register for COM interop, you would usually only do this for a .NET component.

I'm not aware of any C++ example add ins on the sparx website, strange perhaps given EA is written in C++. I would assume the technique would be to

a) Use the #import directive to import the EA.tlb in the C:\Program Files\Sparx Systems\EA directory.
b) Create a normal ATL object and define appropriate methods such as String EA_Connect(EA.Repository repository).
c) Create your registry key using the same .reg file which ships with the other add in samples, using the full prog id of your component.

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Generate C++ Addin
« Reply #2 on: October 15, 2006, 11:36:57 pm »
We do not have any examples of a C++ Add-In on the Sparx website, but there was one posted to the EA User Group website some time ago by 'Paul Ourada':
http://sharepoint.knowledgerecovery.com/external/eaug/EA%20AddIns/CPP_AddinFramework.zip

I haven't had a proper look at it myself, but I believe this follows along a similar track as Matt said in the previous post.
Please note however, if you are using Managed (.NET) C++ then the configuration may be a bit different, such as needing to have a reference to Interop.EA.dll and not EA.tlb.
« Last Edit: October 15, 2006, 11:37:28 pm by AaronB »