Question

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.

Was it helpful?

Solution

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:

OTHER TIPS

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.

An odl file is typically parsed with Mktyplib.exe, whereas idl is parsed with the MIDL compiler. But, as of May 2018, MIDL now includes complete syntax for ODL also, i.e., MIDL compiler can parse any of the 2 input files: idl or odl.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top