An OBJREF is the data type used to represent an actual marshaled object reference. An OBJREF can either be empty or assume one of three variations, depending on the degree to which the object being marshaled uses the hook architecture (IMarshal, etc.) in the marshaling infrastructure. The OBJREF structure is a union consisting of a switch flag followed by the appropriate data.
Contains one interface of an object marshaled in standard form. Contains a standard reference, along with a set of protocol sequences and network addresses that can be used to bind to an OXID resolver that is able to resolve the OXID in the STDOBJREF. This is useful when marshaling a proxy to give to another machine (a.k.a. the "middleman" case). The marshaling machine specifies the saResAddr for the OXID Resolver on the server machine, eliminating the need for the unmarshaler to call the marshaler (middleman) back to get this information. Further, the marshaler does not need to keep the OXID in its cache beyond the lifetime of its own references in order to satisfy requests from parties that it just gave the OBJREF to.
Member | Type | Semantic |
Signature | Unsigned long | Must be OBJREF_SIGNATURE |
Flags | Unsigned long | OBJREF flags (section 3.5) |
iid | GUID | Interface identifier |
std | STDOBJREF | A standard object reference used to connect to the source object (Section 3.4). |
saResAddr | STRINGARRAY | The resolver address. |
A marshaling of an object that wishes to use handler marshaling. 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. See the IstdMarshalInfo interface.
Member | Type | Semantic |
Signature | Unsigned long | Must be OBJREF_SIGNATURE |
Flags | Unsigned long | OBJREF flags (section 3.5) |
Iid | GUID | Interface identifier |
Std | STDOBJREF | A standard object reference used to connect to the source object (Section 3.4). |
Clsid | CLSID | The CLSID of handler to create in the destination client. |
SaResAddr | STRINGARRAY | The resolver address. |
A marshaling of an object which supports custom marshaling. 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. See the IMarshal interface.
Member | Type | Semantic |
Signature | Unsigned long | Must be OBJREF_SIGNATURE |
Flags | Unsigned long | OBJREF flags (section 3.5) |
Iid | GUID | Interface identifier |
Std | STDOBJREF | A standard object reference used to connect to the source object (Section 3.4). |
Clsid | CLSID | The CLSID of handler to create in the destination client. |
cbExtension | Unsigned long | The size fot he marshaled data provided by the source object, plus the size of the extension data, and passed in pData. |
PData | Byte* | The data bytes that should be passed to IMarshal::UnmarshalInterface on a new instance of class clsid in order to initialize it and complete the unmarshal process (class specific data). The first cbExtension bytes are the reserved for future extensions to the protocol, and should not be passed into the custom unmarshaler. CoUnmarshalInterface should skip the extension data, and the data starting at pData+cbExtension should be given to the custom unmarshaler. |