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.
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With