2.2.6.1.5 Object References

Object references as defined in [MS-DCOM] section 1.3.2 MUST NOT be supported unless a well-known binary representation of the object exists.<2> It is the responsibility of the implementation of this specification to obtain that binary representation.

When encountering an object reference while marshaling the method parameters into the marshaled data buffer, implementations of this specification MUST write the structure defined as follows into the buffer instead of writing the reference. If that is not possible, the marshaling MUST fail.

When unmarshaling, a COMQC server MUST replace the binary representation with an instance of the object specified by the binary representation before dispatching the call.

The Object References structure is defined as follows. The alignment of this structure is defined by the marshaling format used. This specification does not mandate any particular alignment.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Reserved 1

Size

Reserved 2

Object ID (16 bytes)

...

...

Padding

Marshaled Object (variable)

...

Reserved 1 (4 bytes):  MUST be set to 0 and ignored on receipt.

Size (4 bytes):  Size of the header not counting the size of the marshaled object. That is, it counts everything up to and including the padding.

Reserved 2 (4 bytes):  MUST be set to either 0x00000001 or 0x00000003 and MUST be ignored on receipt.

Object ID (16 bytes): COM CLSID identifying the object to be marshaled.

Padding (4 bytes):  Aligns the Marshaled Object field on an 8-byte boundary. MUST be set to 0 and ignored on receipt.

Marshaled Object (variable):  The binary representation of the object.