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.
Format The layout of the structure is as follows: (This is example code to inspect the contents of an OBJREF.) OffsetSizeDescription04Signature: 'MEOW'44Flag indicating the kind of structure816Interface identifierFlag = 1: standard244Flags, mostly reserved for the system, but can be used to turn off pinging objects.284Reference count328OXID – object exporter identifier408OID – object identifier4816IPID – interface pointer identifier64variableDUALSTRINGARRAYFlag = 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.80variableDUALSTRINGARRAYFlag = 4: custom marshalling2416Class identifier of the custom proxy4040 (reserved value)444Size of the data below48variableCustom marshalling dataFlag = 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: OffsetSizeDescription02Total number of entries in the arrays below, including nulls22Number of entries in the array that represent string bindings42nString 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.
References