Upon successful compilation, several files are produced.
For IMyComInterface.idl, these are dlldata.c, IMyComInterface_p.c, IMyComInterface.h, and IMyComInterface_i.c. For now, we don't need dlldata.c and IMyComInterface_p.c.
IMyComInterface.h contains both C++ and C definitions of structures to implement
These definitions use several macros that are defined in various include files, included as part of the Visual C++ environment.
Most of the code in IMyComInterface.h is to support C-based COM programming. Because we are using C++, we can ignore this code.
Following is a code excerpt from IMyComInterface.h that defines
IMyComInterface : public IUnknown
virtual HRESULT STDMETHODCALLTYPE Fx1
(unsigned char __RPC_FAR *buf) = 0;
virtual HRESULT STDMETHODCALLTYPE Fx2
(void) = 0;
IYourComInterface : public IUnknown
virtual HRESULT STDMETHODCALLTYPE Zx1
(LONG ix) = 0;
MIDL-generated files include an
const IID IID_IMyComInterface =
const IID IID_IYourComInterface =