OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Wallis Simon (simon.wallis_at_DANFOSS.COM)
Date: Thu Jan 30 2003 - 04:59:45 CST

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

    So how can I stop CoFreeUnusedLibraries looking at the RefCount in the
    clients copy?

    > -----Original Message-----
    > From: Phil Reynolds [mailto:preynoldsRIDGEWAYSYSTEMS.COM]
    > Sent: 30 January 2003 10:34
    > To: DCOMDISCUSS.MICROSOFT.COM
    > Subject: Re: Spontaneous DLL unloading
    >
    >
    > The RefCount in the *copy* of the DLL in s.exe will be
    > greater than 0 as
    > that is where the actual object is.
    >
    > The RefCount in the *copy* of the DLL in the client will be
    > zero as there is
    > no object in the client's *copy* of the DLL.
    >
    >
    > -----Original Message-----
    > From: Wallis Simon [mailto:simon.wallisDANFOSS.COM]
    > Sent: 30 January 2003 10:29
    > To: DCOMDISCUSS.MICROSOFT.COM
    > Subject: Re: [DCOM] Spontaneous DLL unloading
    >
    >
    > I do indeed have dual interfaces and the DLL has a type
    > library. So that
    > explains why the client loads the DLL.
    >
    > To recap, the server, s.exe, loads the dll, d.dll. The
    > client.exe calls
    > GetActiveObject to get the interface to the server. The
    > client gets a list
    > of components loaded by s.exe, and enumerates over the list
    > until it finds
    > the interface provided by the d.dll. d.dll is loaded by the
    > client at the
    > point of QueryInterface.
    >
    > So the question is, why does DllCanUnloadNow find a RefCount
    > of 0? Debugging
    > s.exe shows that the dll ref count is around 8. Yet when the
    > client calls
    > DllCanUnloadNow, the ref count is 0. There seems to be some sort of
    > confusion about which process space to use.
    >
    > Regards,
    > Simon
    >
    >
    > > -----Original Message-----
    > > From: Jonas Blunck TACMa [mailto:jobutac.se]
    > > Sent: 30 January 2003 07:43
    > > To: Wallis Simon
    > > Subject: RE: Spontaneous DLL unloading
    > >
    > >
    > > Are you sure you don't have any [dual] or [oleautomation]
    > interfaces?
    > > If you do, they will be typelibrary marshalled, and if the
    > > typelibrary is included
    > > in the DLL (which normally is the case), the client process
    > > needs to load
    > > the typelibrary and thus the dll.
    > >
    > > Have a look at your dll using oleview and see if the typelibrary is
    > > included in the dll.
    > >
    > > Cheers,
    > > Jonas
    > >
    > > -----Original Message-----
    > > From: Wallis Simon [mailto:simon.wallisdanfoss.com]
    > > Sent: den 29 januari 2003 16:50
    > > To: 'jobuTAC.SE'
    > > Subject: RE: Spontaneous DLL unloading
    > >
    > >
    > > > The DLL is probably loaded into the clients process because of a
    > > > typelibrary marshalled interface and the typelibrary is
    > contained in
    > > > that DLL?
    > >
    > > Are you saying that it is correct for the DLL to be loaded into the
    > > clients process space? I do not have _MERGE_PROXY_STUB set in the
    > > client.
    > >
    > > Simon
    > >
    >
    > ----------------------------------------------------------------
    > 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
    >

    ----------------------------------------------------------------
    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