Methods for converting from a COM interface pointer to an underlying C++
object are described in various embodiments. In the various embodiments,
classes are constructed in support of the underlying C++ object. The
classes are used to enforce rules safely convert a COM interface pointer.
One rule is that a COM interface to be converted cannot be marshaled. A
second rule is that an object requesting the C++ object must have legal
access to the COM interface (for example, the same execution unit). A
third rule is that the object type of the COM interface must be in the
inheritance hierarchy of the C++ object.