🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.controls
Article #30

Re: DLL load from a COM DLL randomly unloaded

#30
From: newrock
Date: Mon, 03 Aug 1998 00:00
72 lines
4069 bytes
We don't use loadlibrary to load the classical DLL, we use VB and the
classical method to load a library in VB. This VB layer is used by the COM
object that wants to use the classical DLL.

We observed that when one ASP session is ended (and thus the Session_OnEnd
procedure in global.asa is executed), though we have several sessions and thus
the ref counter is more than 1 for the COM objects, the classical DLL is
demapped. But not immediatly as I said, only after several secondes or minutes
(with a maximum of 5).

Does anyone already see this behaviour?



In article <6pq6ru$8a0$1@nnrp1.dejanews.com>,
  dguru@my-dejanews.com wrote:
>
>
> How is the DLL loaded from the com object?
> As Far As I know, when you load the library using LoadLibrary you need to call
> the FreeLibrary to unload it.
>
> If it's implicitly linked, then I think it'll stay as long as your COM object
> is in the memory. But when the referrence count of the object becomes 0, I
> think this is marked as the unloadable, though it's in memory, the dlls that
> has been loaded by it may get unlaoded (though I'm not sure about this :-(  ).
> Please correct me if I'm wrong. Any one who has better info about its working
> please enlighten us.
>
> You said, the ref count is decremented. Is it 0 or 1. Does this get unloaded
> even when ref count is more than 0.
>
> Regards,
> Gururaja
>
> In article <6plku8$kua$2@xenon.inbe.net>,
>   "John Gosset" <john.gosset@village.uunet.be> wrote:
> > Hello all,
> > In my company, we developed  a web site accessing a mainframe. We used IIS4
> > and ASP pages calling COM objects ( responsible of connection, exchange and
> > disconnection with mainframe) . The COM object responsible of connection and
> > disconnection is a DLL COM and is "instantiated" with CreateObject each time
> > an asp session is created. This COM object also instantiates a not COM
> > object,in fact, a classical DLL performing the tcp/ip connection to a
> > gateway. We found that we had only one instance of this classical DLL.
> > A problem arises when one ASP session is ended :
> >
> > The COM object responsible of connection and disconnection is decremented
> > his usage counter and stays in memory but the classical DLL is demapped
> > from memory after several minutes (till 5) unless others asp sessions are
> > still living.
> >
> > Can anyone help me in this mix of DLL COM and classical DLL?
> > Can a classical DLL be loaded from a COM DLL ? It's my main question.
> > Is there a problem of keeping in memory classical DLL when loaded by COM
> > objects?
> >
> > John Gosset
> > Communication System Engineer
> > john.gosset@ag.be (at my office)
> > john.gosset@village.uunet.be (at home)
> >
> >
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
>



-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
Technical Details
Message-ID: <6q4jfj$5bq$1@nnrp1.dejanews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6plku8$kua$2@xenon.inbe.net> <6pq6ru$8a0$1@nnrp1.dejanews.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 110a07,742c2344a8461231
X-Google-Attributes: gid110a07,public
X-Google-Thread: 108cda,742c2344a8461231
X-Google-Attributes: gid108cda,public
X-Google-Thread: 1115f8,742c2344a8461231
X-Google-Attributes: gid1115f8,public
X-Google-Thread: f7033,742c2344a8461231
X-Google-Attributes: gidf7033,public
From: newrock@my-dejanews.com
Subject: Re: DLL load from a COM DLL randomly unloaded
Date: 1998/08/03
Message-ID: <6q4jfj$5bq$1@nnrp1.dejanews.com>
X-Deja-AN: 377488710
References: <6plku8$kua$2@xenon.inbe.net> <6pq6ru$8a0$1@nnrp1.dejanews.com>
X-Http-Proxy: 1.0 AGPROXY
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Mon Aug 03 14:55:34 1998 GMT
Newsgroups: comp.os.ms-windows.programmer.controls,comp.os.ms-windows.programmer.memory,comp.os.ms-windows.programmer.ole,fj.os.ms-windows.programming
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 95; AG1824)