Solved

How to replace my ISAPI DLL on a remote Web server ?

Posted on 2000-03-23
5
180 Views
Last Modified: 2010-04-04
Hello,

We try some CGI stuff on a web server.
Our web hosting is a US hosting compagny. We are working here in Europe. It's easy to replace a CGI EXE app on the remote server.

Now, we are working with DLL (ISAPI). When we try to replace the DLL with a new DLL, we are not allowed to delete the file !

How kill the DLL process to remove the DLL from memory and replace the old DLL with the new one.

Is it possible to put in the DLL a procedure to remove the DLL from the memory ?

We don't want to ask each time the people on the US hosting to kill the process ...

Could you give us a working solution ?

Best regards,

Jean-Pol
0
Comment
Question by:jpdupont
5 Comments
 
LVL 13

Expert Comment

by:Epsylon
ID: 2652333
You have to stop and restart the webserver. Then the DLL will be released.
0
 

Author Comment

by:jpdupont
ID: 2652394
Yes ... I'm in Europe and the Server is in the USA ...
Impossible to ask this to the guy at the hosting compagny !

Is it possible to create a EXE app, in the directory of the DLL, to excecute from here in europe, and kill the DLL ?

Thanks,

JP
0
 
LVL 9

Expert Comment

by:ITugay
ID: 2652571
I'm not sure, but you may try to load DLL library dynamically, instead statically:

Handle := LoadLibrary('LIBRARY.DLL');
.....
FreeLibrary(Handle);
.....
/// update your library
.....
Handle := LoadLibrary('LIBRARY.DLL');


Cheers,
Igor.
0
 
LVL 2

Expert Comment

by:ray_leach
ID: 2652607
It seems like a web server configuration issue. In IIS you can specify that the DLL be kept in memory between executions (i.e. shared) or be released with each extention.

You are going to have to get the Web admin to changed the config as above and the restart the server.

After this has been done you should be able to replace the DLL in the future, provided that the application isn't running on another web server thread.
0
 
LVL 15

Accepted Solution

by:
simonet earned 50 total points
ID: 2652858
Use CGI instead.

In your specific scenario, CGI is more appropriate, since you have no control over the server. With CGI, you are allowed to replace the EXE file, since it doesn't stay loaded at all times.

ISAPI DLLs works in the server's memory space (just like a regular DLL does), thus you cannot replace unless the webmaster brings the server down or explicitely unloads the DLL.

Another option is: if you don't want to work with CGI and need to debug the DLL, use IntraBob (www.drbob42.com), which works integrated to the Delphi IDE.

If you want to turn your ISAPI project into a CGI project without loosing any code and without much effort, look here:

http://community.borland.com/delphi/webtech/0,1418,10005,00.html

Yours,

Alex
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 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

18 Experts available now in Live!

Get 1:1 Help Now