Book a Demo

Author Topic: Reverse Engineering IDL  (Read 5589 times)

paul

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • If not now, when?
    • View Profile
Reverse Engineering IDL
« on: February 05, 2003, 10:37:25 am »
Hi All,

I'm using EA to model the interfaces for several large COM implementations. Does anyone have any suggestions about how to generate / rev. eng. IDL from an Interface stereotype. Since our designs essentially are the IDL, we're missing  a lot of the potential benefits of round tripping in EA.


tia,

paul jeffrey


jaimeglz

  • EA User
  • **
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: Reverse Engineering IDL
« Reply #1 on: February 07, 2003, 06:46:40 pm »
Hi Paul,

There are three ways that occur to me to handle IDL:

1. Manually add IDL to EA's datatypes: Reference -> Language Datatypes... -> Add product     and then add, one by one, IDL data types.

2. If anyone in the forum has already added IDL datatypes, please tell Paul by posting in this thread (and then EMail the export file, so Paul can import it, and save some time).

3. Use Java datatypes, and refer to the followin URL for mapping IDL to Java:

http://java.sun.com/products/jdk/1.2/docs/guide/idl/mapping/idl.fm.html

I hope this helps, but I'm not sure if it will satisfactorily solve the issue you have raised.

Jaime Gonzalez

paul

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • If not now, when?
    • View Profile
Re: Reverse Engineering IDL
« Reply #2 on: February 13, 2003, 03:35:29 pm »

Thanks Jaime - that will get me started anyway. Do you have any tips on generating the associated IDL tags like [in. out] etc?

pj

markus

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Reverse Engineering IDL
« Reply #3 on: April 03, 2003, 04:50:33 am »
Hi there,

I've been working on this subject too. My approach (as long as there in no (reverse-)engineering of IDL) is decribed below:
In fact you'll need to have Visual Studio or at least Visual Basic.

Engineer:
Create Classes in EA with stereotype Interface. Add Operations as needed: use as retrun type only OLE-compatible types. Do not use HRESULT as return type. HRESULT will be added automatically.

Generate Code for your class as Visual Basic.

Create an new DLL-project in Visual Basic (MyDll).

Add the generated class(es) to the project. You might need to change datatypes like BSTR to String etc.

Compile the VB Project. It will produce the (MyDll.dll)

Start OleView from Visual Studio Tools.

Use File / View Typelib to open MyDll.dll

Save the TypeLib as MyDll.IDL

Voila!


Reverse Engineer:
Did not need it now, but I would look for a tool, which generates VB-Classes (or C++ et al.) of a TLB and import them into EA


regards

Markus