Solved

How to kill a dll in memory?

Posted on 2000-04-02
5
746 Views
Last Modified: 2012-05-04
hi,friends
  when a shell extention or isapi dll is runned ,I will fail to recompile my  project .I solve the problem by relogin the system frequently,but it is terriable.
  So who can tell me how to kill the dll in memory.Software and program are both appreciated.

thanks a lot
hubdog
0
Comment
Question by:hubdog
5 Comments
 

Expert Comment

by:cAkk
ID: 2678540
if u wanna debug ISAPI application, just
read delphi's help at keyword:
"debugging, Web server applications,"

or u can do this:

edit the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\Parameters
\CacheExtensions = 0

This can disable DLL's cache in memory.
then u can stop IIS service and restart
IIS service (not relogin),and kill the DLL.

cAkk :-)
0
 
LVL 17

Accepted Solution

by:
inthe earned 100 total points
ID: 2678852
hi hubdog,
 if your running iis or pws or whatever webserver you just have to shut down the webserver that will unload the dll.

i found this great tip about debugging shell extensions maybe it gives some help..:

1)  Generate your Shell Extension in Delphi as a DLL.
2)  Set the 'Run' parameters 'Host Application' to
    C:\WINDOWS\EXPLORER.EXE.
3)  Click on the Win95/98/NT 'Start' button and select 'Shutdown'.
4)  Hold 'Ctrl', 'Shift' and 'Alt' and click on 'No'
    with the mouse.  This shuts the shell down leaving
    any applications still running (including Delphi!)
5)  Press F9 (or 'Run' and 'Run' from the Delphi menu)
    and hey presto, the shell appears.
6)  Bring up an instance of Explorer (WIN-E keys), and
    you can set breakpoints and debug your extension
    like any other DLL!
   To get the shell back, just Dbl-Click on the desktop
    (this brings up the Task Manager), select 'File' then
    'Run Application' and select 'C:\WINDOWS\EXPLORER.EXE'
This works because of a little known fact about Explorer.
The first running occurance of Explorer IS the Shell.
All you are effectively doing, is to run the first
occurance of Explorer under Delphi's debugger!
0
 
LVL 2

Author Comment

by:hubdog
ID: 2680661
hi,inthe
I have not tested your post.
but I think it will do the work.
So I will give your the points .
If I meet any question about it ,I will  ask you again.

thank for your help

hi cAKK£¬hehe today I write a shell extention that is great. I will upload it to delphirich a few days later .Do not forget to download it .

also thank you
0
 

Expert Comment

by:HamidHossain
ID: 2683145
Hi all,

inthe,

actually, I hope to find away to kill my dll from memory, but without restarting !! .. I am using ISAPI dlls on my websites .. which hosted with about 200 other websites in the same server .. Shutting server down is a fatal !!! .. Microsoft should offer a way to do that without restarting.

Regards,
Hamid
0
 
LVL 17

Expert Comment

by:inthe
ID: 2684955
hamid ,

obviously this is for testing purposes ,  i mean you wouldnt run some project dll on a realtime working internet hosting server till it had been tested thoroughly would you ..
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

856 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