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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot Compile VB6 DLL after testing it on ASP

Status
Not open for further replies.

jerjim

Programmer
Jan 4, 2001
85
PH
Using VB6, I created an ActiveX Component for an ASP application.
To test it on my PC which runs Windows 98, I start Personal Web Server, open Internet Explorer 5 and
point the browser to my Active Server Pages.

After testing, I cose Internet Explorer, and not only stop Personal Web Server but unload it from memory.

I bring up VB6, open my ActiveX Component, make changes to the source code and then compile.

VB6 says 'Permission Denied".

Apparently IE5 or PWS "locked" or set the Write-protected attribute of the DLL.
If I check the DLL's attributes in Windows Explorer, all attributes are cleared.
But I cannot delete it.

The only solution I have found is to re-boot my PC entirely.
Then I recompile the DLL and test it again.
Then reboot, recompile and test.
Then reboot, recompile and test.

Can anyone suggest an easier way?

 
Install IIS. PWS allways keeps a lock on your dll even if you restart it. Only solution then is to reboot your comp. or wait approx. 20 minutes, then PWS will release the lock.

IIS will also keep a lock on your dll, but restarting IIS will do it.

Good luck!

Jordi Reineman

 
Thanks Jordi but
can i install IIS on Windows98?
 
I believe that IIS has to go on an NT platform (NT4/IIS4 or NT2000/IIS5). The Web Server on the Win9X platforms is always the Personal Web Server (PWS). However, if you are developing software on your PC, you may want to install an NT based OS anyway . .. I find that it is much better for development work. - Jeff Marler B-)
 
jerlim,

It is possible to install IIS on Win98 (it's on the server tools portion of the Visual studio install cd) I've used it myself for a while, but it took me a while to completely disabled PWS. Now I'm developing on win 2000 and that's much better.

Jordi Reineman
 
Visual Studio tools contains the Process Viewer. There is an option to Refresh or Kill. I have not used it yet. I use WPS (which came with VB3 and still worked for Win '95, VB5)Try it. What is th worst that can happen, a reboot?
 
The kill command in pview.exe (Process Viewer) work on those processes that you have access to (i.e. not running under the system user ID). If you ant to be able to shut down any process, there is a utility called Kill.exe that is run from the command line and accepts the process ID (ANY process ID) as its parameter. I believe that it is in either the Windows Resource Kit or then Windows SDK. Its very useful (and quicker than rebooting) for shutting down processes. - Jeff Marler B-)
 
Does restarting IIS really work? I've been trying to figure out the problem for about a month now and i've had no success.

I have to restart or just test the DLL thoroughly to make sure the DLL is running as it out. I suggest using up the Project grouping in VB 6 and when ure done then compile.

Delton Phillips.
deltonphillips@hotmail.com
 
I've always been able to move/recompile DLLs by shutting down IIS and then restarting it after I'm done. I'm using Winnt 4.0 (both server and workstation). Win 9X may behave differently. - Jeff Marler B-)
 
Hmmm, well i know it'll work on Win 98 with PWS. I'm running Windows 2000 Server and IIS 5 though, thanks for the info.

Delton Phillips.
deltonphillips@hotmail.com
 
I run PWS on NT and 98. I use the following code on both machines to restart PWS. It works great!

kill inetinfo.exe
net stop iisadmin /y
mtxstop
net start w3svc
 
you can do this graphically by going to Control Pannel (NT/Win2k)

NT
- Services
Disable FTP Publishing, MS SMTP, Web publishing (forget the actual name), and IIS Administration.
unregister your Dll (I usually rename mine after unregistering for backup purpose)
copy new one on, register it, start the services above again, (in the same order, dont try to disable just IIS and have it automatically disable the rest, I found this to cause problems, same with enabeling)

Win2k, same steps as above, only I belive you have to go into Computer Administration first from control pannel.

I'm remebering this from memory, as I dont have a Webserver in front of me at the moment. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
Thanks KB244, it works and you've saved me lots of time.

Delton.
 
dkk,
Shutting down in the the control panel (a clean shut down) is a preferred way. I would only recommend using the Kill command (shuts down w/o cleaning up) if a process/service will not shut down properly (which is probably what is happening if the lock on a DLL is not being released). - Jeff Marler B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top