XPCOM is a lightweight
cross-platform COM work-alike. It was written as part of the
mozilla web browser, but is now its own, stand-alone project.
It provides interfaces, factories, reference counting, QueryInterface based 'casting', and auto pointers.
More information can be found at http://www.mozilla.org/projects/xpcom.