Solved

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

Posted on 2000-03-23
5
185 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

947 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

22 Experts available now in Live!

Get 1:1 Help Now