OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Dee Holtsclaw (deeSUNBELTSOFT.COM)
Date: Tue Oct 30 2001 - 09:28:49 CST

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

    The debug dump from IRotView is as follows. Note that the call to
    IMoniker::Reduce has the moniker's 'this' pointer as the *ppmkToLeft value.
    Does this make sense? The IRotView version I have is 1.1 on it's AboutBox
    but 5.00.1641.0001 in the binary. Do I just have a munged version perhaps?
    The perplexing thing is that M$'s own monikers work while mine does not.
    This means that their monikers must be anticipating the quirk or something
    else is causing the IRotView to call my moniker differently. [Why can't I
    get a simple problem!?!]

    <DEBUG>
    CTMFactory - IUnknown
    CTMFactory - IClassFactory
    CTMoniker Constructed
    CTMoniker - IMarshal
    CTMoniker::UnmarshalInterface(0056F534,IMoniker,0056F52C)
    CTMoniker::Load(0056F534)
    CTMoniker - IMoniker
    CTMoniker::GetDisplayName(00500920,00000000,0056F8A0)
     DisplayName='FOOBAR:{12345678-9ABC-DEF0-1234-56789ABCDEF0};widget;1' [S_OK]
    CTMoniker::GetDisplayName(00500920,00000000,0056F6E8)
     DisplayName='FOOBAR:{12345678-9ABC-DEF0-1234-56789ABCDEF0};widget;1' [S_OK]
    CTMoniker::Reduce(00500920,0x0,0056F6EC(=01120D00),0056F6F0(=00000000)),
    this=01120D00
    CTMoniker::GetDisplayName(00500920,00000000,0056F6E8)
     DisplayName='FOOBAR:{12345678-9ABC-DEF0-1234-56789ABCDEF0};widget;1' [S_OK]
    CTMoniker::Inverse(0056F6F0)
    CTMoniker::Enum(1,0056F6CC)
    CTMoniker::Hash(00690E94)
    CTMoniker::GetTimeOfLastChange(00500920,00000000,00690E9C)
    CTMoniker::IsSystemMoniker(00690EA4)
    CTMoniker::IsRunning(00500920,00000000,00000000)
    CTMoniker::Reduce(00403A00,0x0,00000000(=00000000),0056EB48(=00000000)),
    this=01120D00
    CTMoniker - IROTData
    CTMoniker::GetComparisionData(0056EB6C,2048,0056EB68)
    </DEBUG>

    Ciao,
    Dee

    > -----Original Message-----
    > From: Distributed COM-Based Code [mailto:DCOMDISCUSS.MICROSOFT.COM]On
    > Behalf Of Dee Holtsclaw
    > Sent: Tuesday, October 30, 2001 9:23 AM
    > To: DCOMDISCUSS.MICROSOFT.COM
    > Subject: IMoniker::Reduce implementation vs. IRotView
    >
    >
    > I'm looking for a solution to problems with my IMoniker implementation.
    > Looking at the 'mkbase.h' implementation from Tim Ewald, Chris
    > Sells and Don
    > Box (inline), this implementation does not take into account 'ppmkToLeft'
    > being NULL. When it is, the ROT will reject a registration since Reduce
    > returns E_POINTER. In addition to this, the IRotView viewer hangs if you
    > zero out the interface pointer it passes in *ppmkToLeft. The viewer also
    > adds an unreleased reference each time it's refreshed. This leads me to
    > believe there's a problem with the Reduce method (or the IRotView
    > utility is
    > munged).
    >
    > My own moniker class is a root level object and self-contained. At the
    > present time, there are no monikers which can be legitamitely composed to
    > the left or right of mine. I can successfully place the moniker
    > into the ROT
    > and retrieve it in another process -- once. Subsequent attempts to get the
    > object from the ROT return MK_E_UNAVAILABLE yet it remains visible in the
    > IRotView until released.
    >
    > Any assistance would be greatly appreciated -- I really need to keep what
    > hair I still have...
    >
    > TIA
    > Ciao,
    > Lawrence "Dee" Holtsclaw
    >
    > Yes, this is cross-posted -- SIA (Sorry in advance)
    >
    > <MKBASE CODE>
    > inline
    > STDMETHODIMP CComMonikerRootBase::Reduce(
    > IBindCtx* pbc,
    > DWORD dwReduceHowFar,
    > IMoniker** ppmkToLeft,
    > IMoniker** ppmkReduced)
    > {
    > HRESULT hr = E_POINTER;
    > if( ppmkReduced && ppmkToLeft )
    > {
    > *ppmkToLeft = 0;
    > (*ppmkReduced = this)->AddRef();
    > hr = MK_S_REDUCED_TO_SELF;
    > }
    >
    > return hr;
    > }
    > </MKBASE CODE>
    >
    > <MY REDUCE CODE>
    > STDMETHODIMP CTMoniker::Reduce(IBindCtx *pbc, DWORD
    > dwReduceHowFar, IMoniker
    > **ppmkToLeft, IMoniker **ppmkReduced)
    > {
    > ATLTRACE("CTMoniker::Reduce(%p,0x%x,%p(=%p),%p(=%p))\n",
    > pbc, dwReduceHowFar, ppmkToLeft, ppmkToLeft ?
    > *ppmkToLeft : NULL,
    > ppmkReduced, ppmkReduced ? *ppmkReduced : NULL);
    > if(!ppmkReduced)
    > return E_POINTER;
    > // if(ppmkToLeft){
    > // if(*ppmkToLeft)
    > // (*ppmkToLeft)->Release();
    > // *ppmkToLeft = NULL;
    > // }
    > (*ppmkReduced = this)->AddRef();
    > return MK_S_REDUCED_TO_SELF;
    > }
    > </MY REDUCE CODE>
    >
    > ----------------------------------------------------------------
    > Users Guide http://discuss.microsoft.com/archives/mailfaq.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

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.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