Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between idl and odl

Tags:

c++

com

idl

What is main difference in IDL and ODL. I have many projects, some of them has idl and some of them have odl. And where I should use them. What are tradeoffs.

like image 648
fhnaseer Avatar asked May 15 '13 08:05

fhnaseer


2 Answers

ODL is a legacy format. It's been replaced by MIDL (a.k.a: IDL). Check this official Microsoft article: MIDL and ODL

The Microsoft Interface Definition Language (MIDL) now includes the complete Object Definition Language (ODL) syntax.

Now, if you have ODL files, you can keep it as is, or migrate them into IDL. That would be the recommended solution but it can be error prone. It's very related to the tool you curently use to build the generated files from it, MIDL.exe or MkTypeLib.exe. Check again the official documentation about these: Differences Between MIDL and MkTypLib

In general, you will want to use the MIDL syntax in your IDL files. However, if you need to compile an existing ODL file, or otherwise maintain compatibility with MkTypLib, use the /mktyplib203 MIDL compiler option to force MIDL to behave like Mkktyplib.exe, version 2.03. (This is the last release of the MkTypLib tool.) Specifically, the /mktyplib203 option resolves these differences:

like image 145
Simon Mourier Avatar answered Oct 16 '22 23:10

Simon Mourier


ODL is acronym of Object Description Language and IDL is Interface Definition Language.

Object Description Language (ODL) was the original interface definition language created by Microsoft for specifying interfaces to be used in OLE Automation. It was a superset of the OMG IDL

If you want describe object maybe ODL is a better tool, it's up to you to design the application object oriented or interface (functional) oriented.

like image 24
masoud Avatar answered Oct 16 '22 22:10

masoud