|
-
Jun 22nd, 2000, 12:36 PM
#1
Thread Starter
Hyperactive Member
Hi there,
I have created a ActiveX DLL which displays a modal form. I have called it from an ASP script to display the modal form. Even after I set the object reference to that DLL to nothing, the DLL is not unloaded from memory i.e. when I try to delete or replace that DLL in Windows Explorer it gives me an error message as Permission Denied. The instancing property for the class in that DLL is GlobalMultiuse. What can be solution to this problem? Thanks in advance.
Code snippet for Activex DLL follows
'Dialog is the modal form
'Code in class file Class1
Private mdlg As Dialog
Private Sub Class_Initialize()
Set mdlg = New Dialog
End Sub
Private Sub Class_Terminate()
Unload mdlg
Set mdlg = Nothing
End Sub
Public Function ShowDialog()
mdlg.Show vbModal
End Function
Code snippet for ASP script
<HTML>
<BODY>
<%
Response.write("Begining of DLL access<BR>")
Dim MyObj
Set MyObj=Server.CreateObject("Trash.Class1")
MyObj.ShowDialog
Response.write("End of DLL access")
Set MyObj=Nothing
%>
</BODY>
</HTML>
-
Jun 22nd, 2000, 02:32 PM
#2
Frenzied Member
Yeah, It's a pain isn't it!
Re-booting your PC will force the dll to be released
alternatively, put this into a batch file and run it when you need the components to be released
Code:
@echo off
NET STOP iisadmin /y
MTXSTOP
NET START W3SVC
sometimes only a re-boot will work though!
take a look at this article as well
http://www.vbsquare.com/articles/aspdev/
-
Jun 22nd, 2000, 10:32 PM
#3
Guru
why do you have a form in your DLL?
-
Jun 22nd, 2000, 10:41 PM
#4
Addicted Member
Yea I've had the exact same problem, what I do is I write my ActiveX dll, and debug it in a different VB project, so that I can work with it there, and get it upto shape, then when I am convident I got that, then adding the DLL on the webserver, then start developing an ASP to work with it, so far the only best method I've found is rebooting the machine, however, before using the DLL , create your webstie on the IIS machine, then goto the IIS manager, right click your site, and there should be a check box on one of the tabs that says something like give the site it's own memory space, this way when that site is not in use, it free's its own memory, IIS by default makes a copy of everything in memory, making the web applicatino use it's owm memory space, might or might not fix that.
-
Oct 4th, 2002, 08:53 AM
#5
New Member
unloading dlls
Thanks, Mark, the batch file works.
A bit late, I know, but that's the good thing of forums
*Presses your nose* "Tooooot!"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|