Partager via


3.1.1.5.3 Unmarshaling an Object Reference

The object exporter MUST perform the following operations to unmarshal an object reference when receiving an ORPC invocation. The object exporter MUST use NDR to unmarshal an OBJREF from a MInterfacePointer in the RPC PDU body. The unmarshaling mechanism consists of the following sequence of operations:

  • If the flags field specifies OBJREF_STANDARD, the object exporter MUST extract the IID and the OBJREF_STANDARD instance from the OBJREF instance.

  • Next, the object exporter MUST extract the STDOBJREF instance and the DUALSTRINGARRAY instance from the OBJREF_STANDARD instance.

  • The object exporter MUST compare the OXID in the STDOBJREF with the OXID of the object exporter. If they are the same, it MUST do the following:

    • The object exporter MUST look up the IPID entry in the IPID table.

    • If the IPID entry is not found, the object exporter MUST return E_NOINTERFACE (as specified in [MS-ERREF] section 2.1).

    • If the IPID entry is found, the object exporter MUST decrement the public reference count in the IPID entry by the cPublicRefs in the STDOBJREF. If the public reference count in the IPID entry becomes zero, the object exporter MUST remove the IPID entry from the IPID table.

    • The object exporter MUST look up the OID entry using the OID in the STDOBJREF.

    • The object exporter MUST return the object pointer in the OID entry to the application.

  • Otherwise, the object exporter MUST proceed as a client. To unmarshal the object reference, see section 3.2.4.1.2.