Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Where is the dll destroy event of an ISAPI dll?

Posted on 2004-03-25
4
Medium Priority
?
730 Views
Last Modified: 2010-04-04
Hi All,

I have an ISAPI dll (using TWebModule) and I need to know where I can put the code for when the DLL is UNloaded from IIS.

I can find the following ok:
thread create (TwebModule.onCreate)
thread destroy (TwebModule.onDestroy)
process create (see below - run when loaded in to IIS)

library dart;
uses
  fastsharemem,
  ActiveX,
  ComObj,
  WebBroker,
  ISAPIApp,
  ISAPIThreadPool,
  Classes;
{$R *.RES}
exports
  GetExtensionVersion,
  HttpExtensionProc,
  TerminateExtension;
begin
  myInitRoutine; // THIS IS RUN WHEN ISAPI IS LOADED IN TO IIS
  CoInitFlags := COINIT_MULTITHREADED;
  Application.Initialize;
  Application.CreateForm(TDARTModule, DARTModule);
  Application.Run;
  // can NOT run myKillRoutine here!
end.

I am wondering where I can put the code to run when the ISAPI dll is UNloaded from IIS (e.g. restart IIS).  This is different from when a thread (request or action) is finished...

Cheers,
Peter
0
Comment
Question by:petervullings
[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
4 Comments
 
LVL 20

Accepted Solution

by:
Madshi earned 800 total points
ID: 10686120
Add a unit to your project and use its finalization part. Alternatively look at the documentation about DllProc.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

636 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