What are oaidl.idl and ocidl.idl for?

M. Dudley picture M. Dudley · Jul 30, 2010 · Viewed 7.3k times · Source

A default ATL Simple Object has the following at the top of its IDL file:

import "oaidl.idl";
import "ocidl.idl";

What are these files for, and how do I know when I need to import them? Is there any documentation which describes what is defined in these two files? I have no idea what "oa" and "oc" stand for, and there are no helpful comments in the files themselves.

Answer

Sheng Jiang 蒋晟 picture Sheng Jiang 蒋晟 · Jul 31, 2010

oaidl.idl and ocidl.idl are shipped with Platform SDK/Windows SDK. They are used to generate oaidl.h and ocidl.h

ocidl is for OLE container (e.g. ActiveX) while oaidl is for OLE automation. search oaidl.h and ocidl.h in MSDN or Windows SDK documentation for information on interfaces defined in these two files.

You may not find enough comments in the files, but the interfaces that are defined there are documented in MSDN.