See the question and my original answer on StackOverflow

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: