Book a Demo

Author Topic: Import IDL-Interfaces from COM-Project  (Read 4287 times)

stefrauc

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Import IDL-Interfaces from COM-Project
« on: June 12, 2006, 02:15:12 am »
Hi,
I would like to import Interfaces from an COM/ATL project.
I already tried the IDL-import from the MDG/Corba plugin but it fails, when the first "[" occurs.
My interfaces look like this:

[
object,
uuid(713C3AF0-6F71-4CF1-9079-84AA8C986B71),
dual,
nonextensible,
helpstring("IGenericBase-Schnittstelle"),
pointer_default(unique)
]
interface IGenericBase : IDispatch{
[propget, id(1), helpstring("property ID")] HRESULT ID([out, retval] BSTR* pVal);

[propget, id(2), helpstring("property Name")] HRESULT Name([out, retval] BSTR* pVal);
[propput, id(2), helpstring("property Name")] HRESULT Name([in] BSTR newVal);
[propget, id(3), helpstring("property Updated")] HRESULT Updated([out, retval] SHORT* pVal);
[propput, id(3), helpstring("property Updated")] HRESULT Updated([in] SHORT newVal);

};

Has anyone imported successfully the interfaces from an COM/ATL project into EA?

Best regards

Stefan Rauch

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Import IDL-Interfaces from COM-Project
« Reply #1 on: June 12, 2006, 04:12:59 am »
Stefan,

Have you tried reformatting the source so that the leading "[" is not alone on the line? (I.e. remove any whitespace and carriage control before the following text.)

This is a bit of a long shot, but I think I remember a few cases where Sparx scripts had problems with 'orphan' pucntuation. The IDL import is an older utility, and may not have been tweaked recently.

It might also be necessary to do the same for the first trailing "]" but I'm not sure. I do not remember seeing anything about these, but perhaps testers have always done them in pairs, and have not encountered the second problem.

David
No, you can't have it!

stefrauc

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Import IDL-Interfaces from COM-Project
« Reply #2 on: June 12, 2006, 04:27:19 am »
Hi David,
thanks for your advice. I tried it out and reformated my interfaces in this style:

[object,
uuid(713C3AF0-6F71-4CF1-9079-84AA8C986B71),
dual,
nonextensible,
helpstring("IGenericBase-Schnittstelle"),
pointer_default(unique)]
interface IGenericBase : IDispatch{
[propget, id(1), helpstring("property ID")] HRESULT ID([out, retval] BSTR* pVal);

[propget, id(2), helpstring("property Name")] HRESULT Name([out, retval] BSTR* pVal);
[propput, id(2), helpstring("property Name")] HRESULT Name([in] BSTR newVal);
[propget, id(3), helpstring("property Updated")] HRESULT Updated([out, retval] SHORT* pVal);
[propput, id(3), helpstring("property Updated")] HRESULT Updated([in] SHORT newVal);

};

Unfortunately the aborted with the same error: Unexpected Symbol: [

Any more ideas?

best regards

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Import IDL-Interfaces from COM-Project
« Reply #3 on: June 12, 2006, 04:39:57 am »
None at all, I'm afraid.

Is there anything you can use to prefix the first line. I don't think a comment would work, but who knows.

Other than that, do a detailed read of the documentation, and look at the Sparx site for a white paper on this. Sparx has recently claimed that the CORBA (and thus IDL) import still works, but it might be something very sensitive about how you use it.
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Import IDL-Interfaces from COM-Project
« Reply #4 on: June 12, 2006, 03:28:18 pm »
The CORBA addin and technology only supports CORBA IDL, not COM IDL.

fgodoy

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Import IDL-Interfaces from COM-Project
« Reply #5 on: March 30, 2007, 04:18:21 am »
Hi,

Can EA import COM IDL like CORBA IDL??

Tks a lot.

binishpeter

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Import IDL-Interfaces from COM-Project
« Reply #6 on: July 26, 2007, 11:28:13 pm »
I had the same problem , I resolved by renaming the .idl to .cs and imported it

still EA wont recognize "coclass" and "library" , they needs to be changes to "class" and "namespace" , if EA  or someone could write an Add-In for this could be useful