MyCom2IMap InterfaceItem { pIID_IMyCom2, OFFSET vtableIMyCom2 } END_INTERFACE_MAP

END_INTERFACE_MAPis a macro to define a NULL interface to mark the end of the InterfaceMap.

 

Each object needs type library support. It needs a pointer to the library ID, and the major and minor versions of the type lib.

MyCom2TypeLibInfo TypeLibInfo { pLIBID_MyCom2, 1, 0 }

 

Now we can define the ClassMap. Each object gets a separate ClassItem structure.

ClassMap ClassItem { pCLSID_MyCom2, DISPINTERFACE + SUPPLY_TYPE_INFO,
OFFSET MyCom2TypeLibInfo, OFFSET MyCom2IMap,
CreateMyCom2, NULL, SIZEOF MyCom2Object }