D
Dan Pierson
It also prevents you from referencing things such as member functions, which are not accessible without name mangling. Of course, they wouldn't mean much to C anyway.
One of the strengths of COM is that it does provide a C level binary interface to a very useful subset of C++ class/member functionality. Of course the C interface is a pain and the Microsoft COM definition requires that it be based on their compiler's vtable layout, but much of that is hard to avoid. (See the first chapter of Essential COM for more insight on this view of the technology, which is rather different from the Microsoft party line.)
Please folks, this last paragraph is just a technical observation, it is neither a proposal that we use COM nor an invitation to yet another
COM/CORBA flame fest.
One of the strengths of COM is that it does provide a C level binary interface to a very useful subset of C++ class/member functionality. Of course the C interface is a pain and the Microsoft COM definition requires that it be based on their compiler's vtable layout, but much of that is hard to avoid. (See the first chapter of Essential COM for more insight on this view of the technology, which is rather different from the Microsoft party line.)
Please folks, this last paragraph is just a technical observation, it is neither a proposal that we use COM nor an invitation to yet another
COM/CORBA flame fest.