Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ATL DLL problem(DLL still in memory)

Status
Not open for further replies.

IonelBurtan

Programmer
May 25, 2001
601
RO
I had posted this also on COM/DCOM forum

I have a question for you guys because there is no dedicated forum for ATL. Maybe you can help.

I have made a ATL DLL project with the Wizards default settings.
I have added an ATL Component of type ActiveX Server Component. I have wrote a dummy method that writes something in the Response Object from ASP called PutSomeResponse(Through the IResponse Interface). It works.
The problem is this:

After I use my component from ASP like this:
<%
Dim obj
Set obj = Server.CreateObject(&quot;MyAspAtl.MyAspComp&quot;)
Call obj.PutSomeResponse()
Response.Write (&quot;Ceva&quot;)
Set obj = nothing
%>
The MyAspAtl.Dll is still in memory. Using some tools I have found out that the Dll was loaded by INetInfo.Exe(IIS's Exe), but the reference count for this Dll is 0!!!

So The Dll is not Unloaded.

I need to use the Dll to recompile & stuff.
I have found a workaround like this, but I am not happy with it:
- at command prompt: net stop w3svc
- recompile & stuff
- at command prompt: net start w3svc

Can you tell me what is going on?
Any help greatly appreciated
s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
In my opinion the DLL will unload when you shut down the explorer. The same problem is in the access, for better performance they lock server. John Fill
1c.bmp


ivfmd@mail.md
 
Thank you for reply,

Using:
- at command prompt: net stop w3svc

I Am stoping the Internet Service. Sometimes, When I do this the DLL is cleared from memory, sometimes not.

I think I understand what you mean by locked in memory, is something from COM, LockServer I think for performance. But I cannot afford myself to shut the explorer down every recompile I make.

Any other ideeas?
s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
In your page make a button what do CreateObject and refresh the browser ever when you want to unload dll. Also make a button what sets object to nothing, but is not required. I'm now sure, but it could help. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top