The Object Exporter

Each computer that supports the COM network protocol supports a one-per-computer service known as the computer's 'Object Exporter.' Communication with an Object Exporter is via a DCE RPC, not an ORPC. To ensure connectivity, the Object Exporter resides at well-known endpoints. It is proposed that the Object Exporter either (i) make use of the same endpoints allocated for the DCE RPC Endpoint Mapper (listed below),12. implying typically that these services are written within the same process on a given computer, or alternately and less preferably (ii) that the Object Exporter resides at a different set of well-known endpoints TBD.

The Object Exporter performs several services:

These services are carried out through an RPC interface (not a COM interface) known as IObjectExporter.

An Object Exporter may be asked for the information required to connect to one of two different kinds of OXIDs, either the OXIDs associated with its own objects, or the OXIDs associated with objects for which it itself is a client, and which it has passed on to a second client computer. This second case, where one marshals an object from one client computer to a second, is colloquially referred to the middleman case. In the middleman case, the exporter is required to retain the connection information associated with the OXIDs that it passes on until it is certain that that the second client computer no longer needs them. More on this below.

Protocol String Name(s)


Description

Object Exporter
End Point13.

Endpoint Mapper End Point


ncadg_ip_udp, ip

CL over UDP/IP.

TBD

135

ncacn_ip_tcp

CO over TCP/IP.

TBD

135

ncadg_ipx

CL over IPX.

TBD

not yet listed

ncacn_spx

CO over SPX.

TBD

not yet listed

ncacn_nb_nb

CO over NetBIOS over NetBEUI.

TBD

not yet listed

ncacn_nb_tcp

CO over NetBIOS over TCP/IP.

TBD

135

ncacn_np

CO over Named Pipes.

TBD

not yet listed

ncacn_dnet_nsp

CO over DECNet Network Services Protocol (DECnet Phase IV).

TBD

69

ncacn_osi_dna

CO over Open Systems Interconnection (DECNet Phase V).

TBD

69

ncadg_dds, dds

CL over Domain Datagram Service.

TBD

12

ncalrpc

Local procedure call.

N/A

N/A


Table 1. Object Exporter Well-known Endpoints

IObjectExporter interface is defined as follows (OBJEX.IDL):


//+-------------------------------------------------------------------------
//
//  Microsoft Windows
//  Copyright (C) Microsoft Corporation, 1992 - 1995.
//
//  File:      objex.idl
//
//  Synopsis:      Interface implemented by object exporters.
//
//  This is the interface that needs to be supported by hosts that export
//  objects. Only one instance of this interface can be exported by the host.
//
//  An object exporter needs to be able to:
//  1. return string bindings that can be used to talk to objects it
//     has exported
//  2. receive pings from object importers to keep the objects alive
//
//--------------------------------------------------------------------------
[
    uuid(99fcfec4-5260-101b-bbcb-00aa0021347a),
    pointer_default(unique)
]

interface IObjectExporter
{
    import "obase.idl";

    // Method to get the protocol sequences, string bindings and machine id
    // for an object server given its OXID.

    [idempotent] error_status_t ResolveOxid
    (
    [in]       handle_t       hRpc,
    [in]       OXID           *pOxid,
    [in]       unsigned short cRequestedProtseqs,
    [in,  ref, size_is(cRequestedProtseqs)]
               unsigned short arRequestedProtseqs[],
    [out, ref] MID            *pmid,
    [out, ref] STRINGARRAY   **psaOxidBindings,
    [out, ref] IPID           *pipidRemUnknown
    );

    // Simple ping is used to ping a Set. Client machines use this to inform
    // the object exporter that it is still using the items inside the set.
    // Returns S_TRUE if the SetId is known by the object exporter,
    // S_FALSE if not.

    [idempotent] error_status_t SimplePing
    (
    [in]  handle_t  hRpc,
    [in]  SETID    *pSetId
    );

    // Complex ping is used to create sets of OIDs to ping. The whole set
    // can subsequently be pinged using SimplePing, thus reducing network
    // traffic.

    [idempotent] error_status_t ComplexPing
    (
    [in]  handle_t        hRpc,
    [in]  SETID          *pSetId,
    [in]  unsigned short  SequenceNum,
    [in]  unsigned short  SetPingPeriod,
    [in]  unsigned short  SetNumPingsToTimeout,
    [out] unsigned short *pReqSetPingPeriod,
    [out] unsigned short *pReqSetNumPingsToTimeout,
    [in]  unsigned short  cAddToSet,
    [in]  unsigned short  cDelFromSet,
    [in,  unique, size_is(cAddToSet)]   GUID AddToSet[],   // add these OIDs to the set
    [in,  unique, size_is(cDelFromSet)] GUID DelFromSet[]  // remove these OIDs from the set
    );
}