Previous Table of Contents Next


17.7.2 IMonikerProvider Interface and Moniker Use


   COM or Automation Views for CORBA objects may support the IMonikerProvider interface. COM clients may use QueryInterface for this interface.

   [object, uuid(ecce76fe-39ce-11cf-8e92-08000970dac7)] // MIDL

   interface IMonikerProvider: IUnknown {HRESULT get_moniker([out] IMoniker ** val);

   }

   This allows COM clients to persistently save the object reference for later use without needing to keep the View in memory. The moniker returned by IMonikerProvider must support at least the IMoniker and IPersistStorage interfaces. To allow CORBA object reference monikers to be created with one COM/CORBA interworking solution and later restored using another, IPersist::GetClassID must return the following CLSID:

   {a936c802-33fb-11cf-a9d1-00401c606e79}

   In addition, the data stored by the moniker’s IPersistStorage interface must be four 0 (null) bytes followed by the length in bytes of the stringified IOR (stored as a little endian 4-byte unsigned integer value) followed by the stringified IOR itself (without null terminator).