473,327 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

ASP Calling ISAPI DLL

Hello ALL,

I have ASP pages that calls some ISAPI dll that created using Delphi for
generating reports. The report page opens fine for 1st time when invoked but
next time i get error like "Name not unique in this context."

My quesry string pass to dll like:
.../ReportsDLL/NameOfDLL.dll?PatID=100578&ThpID=12&State=FL

I think after the DLL is loaded it is not freeing the memory and not
unloading the dll from memory. SO How can i free memory used by the DLL or
unload the DLL from within the ASP page that load the url to
window.location?

How can I free the objects / DLL that I loaded from the ASP page using the
above querystring?

Note: I think the delphi code that is written for DLL is working fine as It
works fine for 1st time.

Please suggest and advice.

Thanks
Prabhat
Feb 3 '06 #1
2 4334
How does your ASP "call" an ISAPI DLL? Is it: Server.Exec() ,
Server.Transfer() , or something else.

Unfortunately, your question about freeing/unloading objects/DLL has no
valid answer because your hypothesis about how ISAPI DLL loads/unloads is
incorrect.

Also, your assumption that your Delphi code is fine is also invalid because
suppose your Delphi code calls CoInitialize() every time -- the first time
would succeed but second time would fail.

Let's first figure out your actual code execution sequence before assuming
anything else.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//

"Prabhat" <no********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hello ALL,

I have ASP pages that calls some ISAPI dll that created using Delphi for
generating reports. The report page opens fine for 1st time when invoked
but
next time i get error like "Name not unique in this context."

My quesry string pass to dll like:
../ReportsDLL/NameOfDLL.dll?PatID=100578&ThpID=12&State=FL

I think after the DLL is loaded it is not freeing the memory and not
unloading the dll from memory. SO How can i free memory used by the DLL or
unload the DLL from within the ASP page that load the url to
window.location?

How can I free the objects / DLL that I loaded from the ASP page using the
above querystring?

Note: I think the delphi code that is written for DLL is working fine as
It
works fine for 1st time.

Please suggest and advice.

Thanks
Prabhat

Feb 3 '06 #2

"David Wang [Msft]" <so*****@online.microsoft.com> wrote in message
news:uJ**************@TK2MSFTNGP15.phx.gbl...
How does your ASP "call" an ISAPI DLL? Is it: Server.Exec() ,
Server.Transfer() , or something else.

Unfortunately, your question about freeing/unloading objects/DLL has no
valid answer because your hypothesis about how ISAPI DLL loads/unloads is
incorrect.

Also, your assumption that your Delphi code is fine is also invalid because suppose your Delphi code calls CoInitialize() every time -- the first time
would succeed but second time would fail.

Let's first figure out your actual code execution sequence before assuming
anything else.

--
//David
IIS


Hi david,

My ASP file frame the URL like:

<% pageUrl=pageUrl & "?" & Request.QueryString()&"&State=" & UserState %>

<html>
<head>
<title></title>
</head>
<script language="JavaScript">
function loadPage()
{
window.location ="<%=pageUrl%>";
}
</script>
<body onload="loadPage();" >
<table align="center" width="80%" cellspacing="10">
<tr><td width="71%" height="200" align="right" valign="bottom">
<font color="#0000FF" size="5" face="Verdana, Arial, Helvetica,
sans-serif">
<b>Requested Report is loading</b></font>
</td>
<td width="29%" valign="bottom"><img align="bottom"
src="images/loading.gif">
</td></tr>
<tr><td align="center" valign="bottom" colspan="2">
<font color="#0000FF" size="5" face="Verdana, Arial, Helvetica,
sans-serif"><b>Please wait.&nbsp;&nbsp;&nbsp;</b></font>
</td></tr>
</table>
</body>
</html>

====================

If we see what is in the pageUrl we get like:
.../ReportsDLL/DLLName.dll?hidPatID=100578&hidThpID=12&hidSqID=1& hidDocType=2
&tType=PT&State=FL

Here the DLL is a ISAPI DLL created in Delphi 5.0. So here http request is
send to the DLL and the code insite the DLL connect to Interbase DB and
Generate report and prepare as PDF. The reporting tool used is Report
Builder for Delphi and for Conversion it uses Pragnaan components.

I am not sure where I get the problem (which may be inside the Delphi code
also). I get error when I close the report window before it display the
report or 2nd time also. 3rd time it will come and 4th time it wont. So I
think there is something not freeing from memory. The Error Message that I
get is mostly: "Name not unique in this context"

Thanks
Prabhat
Feb 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Irene | last post by:
Hi, I have an asp page that allows a user to search for info in a DB and add info to a DB. The search uses "ADODB.Connection" objects in the page, but the add will use a call to an isapi dll...
6
by: msnews.microsoft.com | last post by:
I am a C# programmer with a little C++ experience from a few years ago. I need to write some ISAPI filters and extensions to run on the latest version of IIS on .net Server 2003. Can anyone...
3
by: Lionel Schiepers | last post by:
I rencently tested an web application with ISAPI extensions that internally use managed extensions but the call to the ISAPI failed. I receive the following message: "A dynamic link library (DLL)...
2
by: Norton | last post by:
I had a person tell me the other day that a person would not be able to beat the efficiency of an ISAPI dll, especially by using handlers/modules. Of course, they could only say the reason was that...
2
by: Jon Maz | last post by:
Hi All, I've been looking into options for URL Rewriting in .net, and to be honest, I haven't seen anything that's easier than the old Classic Asp solution with an ISAPI filter redirecting to an...
2
by: yachtIT | last post by:
HI MS, I have read from official microsoft msdn that an HTTPhandler in .NET can do anything a c++ isapi extension can do. Only a .NET HTTPhandler has a much more easy programming model. ...
0
by: Prabhat | last post by:
Hello ALL, I have ASP pages that calls some ISAPI dll that created using Delphi for generating reports. The report page opens fine for 1st time when invoked but next time i get error like "Name...
2
by: Drew Burchett | last post by:
I am currently coding an ISAPI filter and I would like to use some .Net functionality within the filter. However, when I include calls to anything in the framework, it locks the dll and will not...
0
by: Chris Curvey | last post by:
Hi all, I'm trying to write an ISAPI filter in Python, using the examples that come in the "isapi" directory of the win32com package. The installation program itself runs fine, but when I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.