ASP Calling ISAPI DLL

Ask a Question related to ASP Components, Design and Development.

  1. #1

    Default 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


    Prabhat Guest

  2. Similar Questions and Discussions

    1. how to Debug ISAPI DLL
      Hi I am developing a ISAPI dll. Can anyone help me how to debug it, in the VC6 IDE. Regards Prashant Sharma
    2. ISAPI?
      I need some help finding information on CF upgrades and ISAPI. Someone suggested that my CF MX 7 upgrade did not upgrade ISAPI. Where can I find...
    3. anyone used ISAPI?
      I believe that ISAPI can convert a search engine friendly url string into a querystring? does anyone have any tutorials about using this feature in...
    4. ISAPI Problems
      Is anyone else having this problem? Remember with CGI php.exe you could set the timeout in IIS? It seems to me (after much searching) that you...
    5. ISAPI
      anyone know how to use this component, am i right in thinking that it will convert something like default.asp?pageid=100&cat=74 to ...
  3. #2

    Default 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


    Prabhat Guest

  4. #3

    Default Re: ASP Calling ISAPI DLL

    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
    [url]http://blogs.msdn.com/David.Wang[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.
    //

    "Prabhat" <not_a_mail@hotmail.com> wrote in message
    news:%23nZcCVJKGHA.2808@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
    >
    >

    David Wang [Msft] Guest

  5. #4

    Default Re: ASP Calling ISAPI DLL


    "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
    news:uJYMBFKKGHA.2248@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


    Prabhat Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139