Previous | Table of Contents | Next |
The interface ID corresponds to the interface used to encapsulate the unmarshaled data. It must provide accessors for all
the members that are being marshaled, in the order that they are marshaled. This interface ID may be different than the interface
ID actually marshaled in the call, since it reflects the content of an object rather than the interface through which it is
used at the time of the call. For instance, a class encapsulating a structure may be marshaled as an IUnknown, which will
be the class ID in the standard marshaling packet, but this is of no help in unmarshaling the structure. Thus, this identifier
is used to describe the marshaled members.
If the object is standard marshaled, the unmarshal class ID field should be CLSID_NULL. However, if an interface pointer is
custom marshaled, its marshaling data does not contain a standard OBJREF, which could be used by the proxy to recover the
marshaled data (since nothing can be presumed about the way that the proxy will be communicating with its server). In that
case, the object’s proxy will be different than the regular proxy for this interface, so the correct custom marshaler must
be loaded if correct unmarshaling is to be achieved.