delpro
asked on
Terminate a ISAPI (dll)
How do I Terminate a ISAPI (dll) when it is on the web?
Note that with IIS you can also choose to disable ISAPI caching, which will make the webserver unload the DLL after every request. This is great for development and testing.
ASKER
Is there a way to do it in the program
There is no API for this, no. Would not really make sense anyways since ISAPI works with DLLs (librarys!) and only makes calls to the DLL when necessary; besides from this, the DLL does not "run" (unlike a normal application, or a CGI application).
The only dirty trick you could try is to somehow stop or kill the web server from within one of the entry-points of your DLL, but that's not a really good idea. Therefore, use one of the other suggested methods. For you, disabling the ISAPI DLL cache might be exactly what you want.
The only dirty trick you could try is to somehow stop or kill the web server from within one of the entry-points of your DLL, but that's not a really good idea. Therefore, use one of the other suggested methods. For you, disabling the ISAPI DLL cache might be exactly what you want.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Wait for a long time for this.
Thanks
Thanks
In order to release the lock on a DLL, PWS must be manually stopped using the command prompt. By default, Pws.exe resides in the folder C:\Windows\System\Inetsrv.
To stop PWS, type the following command:
windows\system\inetsrv\pws
You can then restart PWS manually restarted from the Command Prompt by using the following command:
windows\system\inetsrv\pws
Once PWS is stopped, this will release the ISAPI DLL. Recompile the DLL, if necessary. Once PWS restarts, it will again lock the DLL when it gets instantiated by your browser.
For IIS
At the run line, type: net stop iisadmin /y and then press Enter. This will stop all services while running the make on the DLL.
After recompiling your DLL, type: net start w3svc from the run line. Your services will be up again.
Best Regards
Cesario