2.4 Marshaled Interface References

The DCOM protocol extends the Network Data Representation (NDR) standard specified in [CAE RPC] by defining what can be thought of as a new primitive data type that can be marshaled: that of an interface reference to an object. This is the only extension to NDR made by the DCOM protocol.

A marshaled interface reference is described by a type known as an OBJREF, which is described in detail in Section 3.3. An OBJREF in actuality has several variations:

NULL

This is a reference to no object.

STANDARD

A standard remote reference. Known as a STDOBJREF. A STDOBJREF contains:

CUSTOM

Contains a class ID (CLSID) and class-specific information.

The Custom format gives an object control over the representation of references to itself. For example, an immutable object might be passed by value, in which case the class-specific information would contain the object's immutable data.

HANDLER

A sub-case of the custom reference in which the class- specific information is standardized.

For example, an object wishes to be represented in client address spaces by a proxy object that caches state. In this case, the class-specific information is just a standard reference to an interface pointer that the handler (proxy object) will use to communicate with the original object.

Interface references are always marshaled in little-endian byte order, irrespective of the byte order prevailing in the remainder of the data being marshaled.