Partager via


3.2.4.3 Marshaling an Object Reference

When a DCOM application sends an object reference in an ORPC invocation, it MUST supply the IPID. To marshal the object reference, the client MUST do the following:

  • It MUST look up the IPID entry using the IPID.

  • It MUST look up the OID entry using the OID from the IPID entry.

  • It MUST look up the Resolver table entry using the STRINGBINDING hash from the OID entry.

  • It MUST create an STDOBJREF instance as follows:

    • It MUST set the flags field to SORF_NOPING if the garbage_collection flag in the OID entry is True. Otherwise, it MUST set the flags field to 0.

    • If the IPID entry contains more than one public reference count, it SHOULD decrement the public reference count of the IPID entry and set cPublicRefs to 1.

    • Otherwise, it MUST request additional reference counts for the object reference, as specified in section 3.2.4.4.1.

    • It MUST set the oxid field in the STDOBJREF instance to the value of the OXID from the IPID entry.

    • It MUST set the oid field in the STDOBJREF instance to the value of the OID from the IPID entry.

    • It MUST set the ipid field in the STDOBJREF instance to the value of the IPID specified by the DCOM application.

  • It MUST create an OBJREF_STANDARD instance as follows:

    • It MUST set the std field to the STDOBJREF instance created previously.

    • It MUST set the saResAddr field to the DUALSTRINGARRAY from the Resolver table entry.

  • It MUST create an OBJREF instance as follows:

    • It MUST set the signature field to 0x574f454d.

    • It MUST set the flags field to OBJREF_STANDARD.

    • It MUST set the iid field to the IID from the IPID entry.

    • It MUST set the u_objref to the OBJREF_STANDARD created previously.

  • It MUST use NDR to marshal the OBJREF into a MInterfacePointer that is placed in the RPC PDU body.