Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Activex dll stuck in memory

Posted on 2001-08-03
19
Medium Priority
?
368 Views
Last Modified: 2012-06-27
I am using an activex dll in my asp pages.  The problem is that everytime I need to modify the activex dll i get the error "permission denied" because something is holding onto the dll.  I need to restart the computer each time to free it up.

I have tried closing the browser and stopping Personal Web Server, nothing works.  I can't do anything to that dll until I reboot the machine.

Is there a way to unload this from memory, either manually or through the code?  I have already tried setting the object to nothing in the asp page and that does not work.

Thank you.
0
Comment
Question by:suzuki
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
  • +6
19 Comments
 
LVL 20

Accepted Solution

by:
jitganguly earned 400 total points
ID: 6350000
How are you stopping PWS ?

Go to Control panel, services, choose worlwideweb publishing services and stop and try.

Also close all browser windows and VID (if you use)
0
 
LVL 7

Expert Comment

by:John844
ID: 6350006
you will have to close interdev also.  it holds a reference to the dll if you have opened the page referencing the component.
0
 
LVL 7

Expert Comment

by:John844
ID: 6350009
sorry jitganguly, I new see you included that in your comment.
John
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 20

Expert Comment

by:jitganguly
ID: 6350011
Hey John,
Good to see you on the list. Great job
0
 
LVL 5

Expert Comment

by:dredge
ID: 6350017
suzuki:

if you are running NT workstation, or Win2K Pro, then i suggest setting up your .dll file in Microsoft Transaction Server. This will let you replace the file without having to stop or start anything.

it takes a minute or two to set up, but it's well worth the effort and will save you time and headaches in the end.
0
 
LVL 7

Expert Comment

by:John844
ID: 6350026
Thanks jitganguly.

dredge has a good point, and it is also available with PWS.

you will find this in the nt option pack(even for PWS).
0
 
LVL 20

Expert Comment

by:jitganguly
ID: 6350044
Well, I think his/her problem is to generate the DLL from the VB/VC++ source and MTS will not help in this matter. He/she needs to stop the service. At least for NT opt pack 4 I know I used to have trouble.
MTS will only allow him/her to make a better application
0
 
LVL 5

Expert Comment

by:dredge
ID: 6350084
jit: (honest question - i'm sure you know but i want to ask, in order to let others know)

when you ran MTS with your .dll, did you manually register the dll? (regsvr32 myfile.dll) if you did, then this is where the problem is.

when setting up a dll in MTS, you should not register the dll manually - let MTS do it for you. when you do this, you will be able to replace the file with a newer version without having to stop and start any services. this is one of the biggest reasons i use mts.

but then, i don't have much experience with it on NT 4 - just Win2K.
0
 
LVL 20

Expert Comment

by:jitganguly
ID: 6350137
Well, dredge  let me tell you my experience

I used to write Active X DLL from VB 5/6 and I used to  make DLL from VB itself and then move the DLL to web server, register it there with regsvr32 and put the DLL in MTS.
Now whenever I had to modify that DLL, I had this problem . In the sense after changing and moving it to the web server when I tried to re-register, I had to stop IIS, MTS everything ...
But I am talking about NT 4/option pack4 service pack 4
Don't know about win2k
0
 

Author Comment

by:suzuki
ID: 6350204
Thanks everyone for all your help but nothing works yet.  Maybe the problem is that I am doing this on a Win98 machine?


0
 
LVL 20

Expert Comment

by:jitganguly
ID: 6350235
suzuki,
Just try closing web site adminstrations from control panel/services and try to recompile the dll
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6350817
Close all asp files in InterDev.
Stop PWS
Close all browsers.
Unregister your dll
Re-register your dll
Restart your computer

hongjun
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6350819
Sorry did not read your question carefully that you actually do not want to reboot your machine.

hongjun
0
 
LVL 14

Expert Comment

by:puranik_p
ID: 6351064
On IIS, you just have to stop IIS to free and unregister dll.
but my friend, in case of PWS there is no other solution than restarting the system itself.
the only solution i can think of is..
Use IIS and NT if possible.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6351264
I am surprised that nobody has shown the exact syntax to stop the real PWS service.

For IIS you can type the following in the Run-dialog to stop IIS and unload the activex dll.
net stop iisadmin
and starts again using:
net start w3svc -e

For PWS you should type:
net stop w3svc
net start w3svc

Now your dll should also be freed.

Regards,
CJ
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6351270
Another way you can debug your activex control / component is by running it in the IDE. For example if you are creating an activex dll, and you want to debug it. Set the project's properties correctly (run in browser, and point to the correct url where the dll is being used). Start the dll, and it will go to the url you have specified. As you can see the dll will be used which is running in the IDE. WHen you stop the component in the IDE, you can debug it further, and start again. This way you don't have to worry about stopping and starting the WWW service.

Regards,
CJ
0
 
LVL 5

Expert Comment

by:Droby10
ID: 6352099
one thing that hasn't been addressed is the possiblity of two-way binding outside of the dll to other libraries and services (bad idea anyway, but it happens)...

stopping iis/pws/mts etc. will only release the object instances it's created from the iis/pws context...but if any of those objects are shared with external libraries, those objects would continue to exist and continue to lock the dll.

if this is what is going on the best programming practice is to create and release at a function/method scope; not on an object or application scope.  this means avoiding setting persistent objects within the session or application contents as well.
0
 
LVL 20

Expert Comment

by:jitganguly
ID: 6352374
CJ_S,
Stopping IIS from Control panel/services is same as issuing net stop ...
Therefore I did not mention that
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6724692
I am sorry to see that Asker has not returned to update and finalize this question.  I am, therefore, force accepting this question.  In the event the Asker returns with additional needs related to this question, please respond and continue the collaboration process.
 
If there are questions in this regard, please comment and I'll return when I can.
 
The HELP DESK link on the left is informative, and includes this site's Guidelines and Member Agreement as well as assistance related to Questions and Answers.  Here is the QA link, as a reference.
 
http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp
 
Thank you,
Moondancer
Community Support Moderator @ Experts Exchange
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question