Solved

How to kill a dll in memory?

Posted on 2000-04-02
5
703 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now