OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Dave Sirockin (dave.sirockinMSI-WORLD.COM)
Date: Fri May 18 2001 - 08:58:01 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    I have a multi-layer containment hierarchy of objects implemented using
    standard ole interfaces (IParseDisplayName, IOleItemContainer,
    IOleContainer, IOleObject, IOleClientSite and a root object which implements
    a class moniker. An external client can successfully access any object in
    the hierarchy MkParseDisplayName to parse a composite moniker of the form
    "CLSID!Child1!Grandchild2!GGrandchild3" the binding to the returned moniker.

    What I now want to do though is a allow an object in the hierarchy to access
    another one, via a relative 'path' - eg from the above path, access a
    'cousin' using a path like "..\..!Grandchild3!GGrandchild4". What is the
    easiest (or most correct) way of doing this?

    The only way I can currently think that a child object could do this is as
    follows:
    Method A
    1. Create a composite moniker representing the relative path, using anti
    monikers and item monikers
    2. Call IOleClientSite::GetMoniker() to get the container's moniker
    3. Call IMoniker::ComposeWith() to combine the container's moniker with the
    relative path moniker
    4. Bind to the new composite

    This sounds okay except that step 1, the creation of the relative path
    moniker, seems unnecessarily complex, compared to the simplicity of calling
    a MkParseDisplayName() type function. Am I missing something obvious?

    Any ideas?

    Thanks

    Dave

    ----------------------------------------------------------------
    Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM