Reference articles on history, science, culture and more
Encyclopedia

OBJREF

OBJREF is the name of the structure of marshalled interfaces in COM and DCOM. Because COM interfaces can only be called directly from the context (like a thread, process or machine) where they originated, when they are needed in another context they are marshalled in this structure, which is then passed to the destination context where it is unmarshalled to a proxy that takes care of the necessary communication, for example passing messages or network packets or marshalling other interfaces passed in calls.

01Format

The layout of the structure is as follows:

OffsetSizeDescription
04Signature: 'MEOW'
44Flag indicating the kind of structure
816Interface identifier
Flag = 1: standard
244Flags, mostly reserved for the system, but can be used to turn off pinging objects.
284Reference count
328OXID, object exporter identifier
408OID, object identifier
4816IPID, interface pointer identifier
64variableDUALSTRINGARRAY
Flag = 2: handler (an extension of standard)
6416Class identifier of a class that will be used as a handler for the interface, i.e. sit between the client and the proxy.
80variableDUALSTRINGARRAY
Flag = 4: custom marshalling
2416Class identifier of the custom proxy
4040 (reserved value)
444Size of the data below
48variableCustom marshalling data
Flag = 8: extended (also an extension of standard)
644Signature 'VYSN'
68variableDUALSTRINGARRAY
 41 (historically the number of data elements below, but there always is only a single element)
 4Signature 'VYSN'
Data element used to identify and marshal an envoy context:
 16Context identifier
 4Size of the data below, excluding padding
 4Size of the data below, including padding
 8nA marshalled envoy context, padded to a multiple of eight bytes

The layout of DUALSTRINGARRAY is:

OffsetSizeDescription
02Total number of entries in the arrays below, including nulls
22Number of entries in the array that represent string bindings
42nString and security bindings

The string bindings are null-terminated records specifying connection information, like IP addresses, and the security bindings are null-terminated records specifying authentication information. Both arrays are null-terminated too.

Watch videos about OBJREFExplainers and documentaries on YouTube (opens in a new tab)

Sources and credits

This article is adapted from the Wikipedia article OBJREF, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.

Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.