OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Brian Muth (bmuthSTRAIGHTTHROUGH.COM)
Date: Thu Jan 24 2002 - 16:01:43 CST

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

    I would call into question any code that would use CCIEx to return both
    IUnknown and IDispatch. Although it is not an error, it suggests the
    author doesn't fully understand the principles of COM, since returning
    IDispatch is sufficient.

    Assuming you are talking about CoSetProxyBlanket, it is not known for
    leaking memory. So this is at variance with your observation.

    How do you know memory is leaking? You may need to show us some code.

    > -----Original Message-----
    > From: Paramasivam, GowriSankar (PCLN-NW)
    > [mailto:GowriSankar.ParamasivamPRICELINE.COM]
    > Sent: Thursday, January 24, 2002 1:13 PM
    > To: DCOMDISCUSS.MICROSOFT.COM
    > Subject: CoSetProxyBlanket() and CCIEx() requesting IUnknown and
    IDispatch
    > in Multi_QI
    >
    > Hi,
    >
    > I came across an implementation that uses Proxy Blankets and leaks
    > memory. I guess the usage was not correct. But I would like to what is
    > exactly going wrong.
    >
    > A NON-MTS Component in Machine-A creates a MTS-Object in
    Machine-B
    > using CCIEx and gets IUnknown and IDisptach, both in the CCIEx-
    > CoCreateInstanceEx itself [using
    > MULTI_QI]. Then It calls SetProxyBlaket on both of these interfaces.
    Later
    > it releases IUnknown and passes IDispatch to a Client(ASP/IIS) in Same
    > Machine (Machine-A).
    >
    > In the above the NON-MTS Component in Machine-A component leaks memory
    > significantly. But if dont call SetProxyBlaket on IUnknown Interface
    (got
    > through MULTI_QI of CCIEx), the leak stop.
    >
    > Can you please help if knowing what is going wrong
    >
    > Thanks
    > Gowri
    >
    >
    > On Tue, 13 Oct 1998 16:23:12 -0700, Brown, Keith <kbrownDEVELOP.COM>
    > wrote:
    >
    > >Blankets are set on a per-interface-proxy basis, and the
    > >proxy manager also has a separate blanket for IUnknown.
    > >To control QueryInterface calls, you must explicitly QI for
    > >IID_IUnknown, and set the blanket on IUnknown.
    > >
    > >In SP3, this only controls the settings for QI.
    > >In SP4, this will also control the settings for Release().
    > >
    > >This means that the remote object will hang around for a few
    > >minutes after you release the proxy (since internally
    > >RemRelease will fail with E_ACCESSDENIED). The final release
    > >will occur when the garbage collector decides the remote
    > >proxy is no longer around.
    > >Once again, this is fixed in SP4.
    > >
    > >BTW, you might be interested in the universal delegator at my
    > >site - it makes managing proxy blankets quite a bit easier,
    > >since you only need to set the blanket once for all interfaces.
    > >
    > >Keith
    > >http://www.develop.com/kbrown
    > >
    >
    > ----------------------------------------------------------------
    > 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