OBJREF
Encyclopedia
OBJREF is the name of the structure of marshal
Marshalling (computer science)
In computer science, marshalling is the process of transforming the memory representation of an object to a data format suitable for storage or transmission...

led interfaces in COM
Component Object Model
Component Object Model is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages...

 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:
OffsetSizeDescription
0 4 Signature: ‘MEOW’
4 4 Flag indicating the kind of structure
8 16 Interface identifier
Flag = 1: standard
24 4 Flags, mostly reserved for the system, but can be used to turn off pinging objects.
28 4 Reference count
Reference counting
In computer science, reference counting is a technique of storing the number of references, pointers, or handles to a resource such as an object, block of memory, disk space or other resource...

32 8 OXID – object exporter identifier
40 8 OID – object identifier
48 16 IPID – interface pointer identifier
64 variable DUALSTRINGARRAY
Flag = 2: handler (an extension of standard)
64 16 Class identifier
Globally Unique Identifier
A globally unique identifier is a unique reference number used as an identifier in computer software. The term GUID also is used for Microsoft's implementation of the Universally unique identifier standard....

 of a class that will be used as a handler for the interface, i.e. sit between the client and the proxy.
80 variable DUALSTRINGARRAY
Flag = 4: custom marshalling
24 16 Class identifier of the custom proxy
40 4 0 (reserved value)
44 4 Size of the data below
48 variable Custom marshalling data
Flag = 8: extended (also an extension of standard)
64 4 Signature ‘VYSN’
68 variable DUALSTRINGARRAY
  4 1 (historically the number of data elements below, but there always is only a single element)
  4 Signature ‘VYSN’
Data element used to identify and marshal an envoy context:
  16 Context identifier
  4 Size of the data below, excluding padding
  4 Size of the data below, including padding
  8n A marshalled envoy context, padded to a multiple of eight bytes

The layout of DUALSTRINGARRAY is:
OffsetSizeDescription
0 2 Total number of entries in the arrays below, including nulls
2 2 Number of entries in the array that represent string bindings
4 2n String and security bindings

The string bindings are null-terminated
Null character
The null character , abbreviated NUL, is a control character with the value zero.It is present in many character sets, including ISO/IEC 646 , the C0 control code, the Universal Character Set , and EBCDIC...

 records specifying connection information, like IP address
IP address
An Internet Protocol address is a numerical label assigned to each device participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing...

es, and the security bindings are null-terminated records specifying authentication information. Both arrays are null-terminated too.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK