COM DLL Keeps Open After Use

Results 1 to 9 of 9

Thread: COM DLL Keeps Open After Use

  1. #1
    Milton Alexandre (BR) Guest

    Default COM DLL Keeps Open After Use

    Hi...<BR><BR>I built a COM DLL in Delphi5. It works in a VB6 EXE program and in an ASP script as shown bellow:<BR><BR> &#060;%<BR> dim yyy<BR> set yyy = Server.CreateObject("Lib.Obj")<BR> Response.Write yyy.SelfCheck &#039;return just a "OK" string<BR> set yyy = nothing<BR> %&#062;<BR><BR>After it runs the DLL keeps open. And when I try to rebuild it, Delphi5 says "cann´t create Lib.dll...". And for any kind of manipulation of the Lib.dll file the system says "Lib.dll is in use by another...".<BR><BR>Finally I must to reboot so I can continue working with my Lib.dll.<BR><BR>Why? For goodness sake...<BR><BR>Thanks<BR>Regards<BR><BR>Milton Alexandre<BR>São Paulo - Brazil<BR>

  2. #2
    David Thomas Guest

    Default RE: COM DLL Keeps Open After Use

    I would like to know the answer to this as I am having the exact same problem.<BR><BR>I have to reboot my server, but I am using VB 5 to create the dll file.<BR><BR>David Thomas<BR>

  3. #3
    Steve Cimino Guest

    Default RE: COM DLL Keeps Open After Use

    IIS keeps ahold of it... do this:<BR><BR>1. Open ye olde DOS prompt<BR>2. Type net stop iisadmin<BR>3. Type &#039;y&#039; to confirm<BR>4. Update your component<BR>5. Reregister it if it makes you feel better<BR>6. Type net start w3svc<BR>7. voila

  4. #4
    Karin van Ettinger Guest

    Default It's Nothing

    change your code as follows<BR><BR>set yyy = Nothing &#039;nothing -&#062; Nothing<BR><BR>VBScript doesn&#039;t warn you. But sometimes it&#039;s just the capslock.

  5. #5
    Ed Guest

    Default Er

    VB is case-INsensitive, so:<BR><BR>Set x = nothing<BR><BR>is syntactically equivalent to:<BR><BR>Set x = Nothing

  6. #6
    Milton Alexandre [BR] Guest

    Default RE: IIS Holds It, InterDev Too

    Oi (Hi)<BR><BR>I have alredy tried to do what you told me to do, Steve (to stop/start IIS Admin service) but DLL continued open.<BR><BR>So I noticed that InterDev holds DLLs open too. Then it is necessary to stop/start IIS as you told me (thanks) and to close/release the InterDev "code editor" window to free DLL.<BR><BR>As you know, it is so dificulty down/up the IIS, close/open InterDev windows all the time. Then I built a little Delphi EXE program to test every change in Delphi DLL library before use it in ASP scripts.<BR><BR>If someone knows a better way, please...<BR><BR>Thank you very much Steve, Karin, Ed.<BR><BR>[]s<BR><BR>Milton Alexandre<BR>

  7. #7
    Karin van Ettinger Guest

    Default question and remarks

    first question.<BR>I suppose you mean Server.CreateObject("Lib.dll") and not <BR>Server.CreateObject("Lib.Obj")?<BR><BR>I always keep my development executables separated from the production environment. So I never receive during build a replacement error unless I hold my dll from test-environment.<BR><BR>To replace asp&#039;s and dll&#039;s I always follow the following steps:<BR>- shut down server processes in MTS<BR>- stop the website<BR>- if the dll&#039;s are registered with regsvr32 .. unregister<BR>- replace asp&#039;s/dll&#039;s (Now I&#039;m able to replace asp&#039;s as well as dll&#039;s)<BR>- register NOT-mts dll&#039;s with regsvr32<BR>- start the website<BR><BR>Another thing:<BR>I always replace the asp&#039;s and dll&#039;s logged in on the server. If I do not I can&#039;t replace the asp&#039;s due to security.<BR><BR>I don&#039;t know but maybe this will help you ??..<BR><BR>

  8. #8
    CrzyCracker Guest

    Default RE: IIS Holds It, InterDev Too

    The easiest way to do it, that I&#039;ve found, is to actually debug it inside of VB6. All you got&#039;s to do is hit the little play button and VB6 registers your components and everything. You just refrence it in you asp page. Once you hit stop, it unloads it out of memory. No problems.. no creating dlls all the time.

  9. #9
    Milton Alexandre [BR] Guest

    Default Last Question

    Are you a "cyberangel"? :)<BR><BR>So I understood the steps I must to follow in order to replace ASP&#039;s and DLL&#039;s.<BR><BR>How can I ask you the following...<BR><BR> there something I can do for you?<BR><BR>Thanks a lot<BR><BR>

Posting Permissions

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