COM DLL caching problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanndeb
    New Member
    • May 2010
    • 33

    COM DLL caching problem

    Hi guys hope you all are fine :)

    I have built a com visible dll in .Net 3.5. As i wanted to call it from classic asp & I registered it in the following way.

    Code:
    gacutil /i COMCallFromASP.dll
    
    regasm /tlb COMCallFromASP.dll
    and my asp code is like

    Code:
    <%
    	Dim obj
    	Set obj = Server.CreateObject("COMCallFromASP.HelloWorld")
    	Dim str
    	obj.SayHello "San", str 
    	response.write str 
    %>
    My output is simply "Hello San"

    Now I made a change in the function body (not in the parameter or return type) to return like "Hi there San" & the I re-registered the dll by Uninstalling & installing the dll again...
    Code:
    regasm /u COMCallFromASP.dll
    gacutil /f /u COMCallFromASP
    
    gacutil /i COMCallFromASP.dll
    regasm /tlb COMCallFromASP.dll
    The surprisingly when i browse the asp page I still get the same old "Hello San" instead of "Hi There San".
    When I restart the machine & then only I get the desired result. Guess there's a problem in dll caching.

    Pls help how to do it without restarting the machine. I also checked the folder %SystemRoot%\Sy stem32\DllCache but theres no sign of my dll there at any time.

    Also after the first call to the page i find dllhost.exe is running in the taskmanager & though I unregister the dll I can't delete the .tlb file as its locked by dllhost. Why dllhost is not unloading after the call?
Working...