Link to home
Start Free TrialLog in
Avatar of fsiwrb
fsiwrb

asked on

Cannot release ActiveX dll

Hello all,

I have a small problem.  I created an activeX dll and for some reason I cannot release it with the =nothing command.

I get:
Error Type:
Microsoft VBScript runtime (0x800A005B)
Object variable not set
/encoder.asp, line 18


Here is my code:
<%
     dim Encode
     set Encode = Server.CreateObject("MyTools.Encode")

     dim Strng
     Strng = "This string will be encoded soon!"

     dim codedString
     codedString = Encode.Code(cStr(strng), "Reg Key")

     dim deCodedString
     deCodedString = Encode.Code(cStr(codedString), "Reg Key")

     response.write(Strng + "<br />")
     response.write(server.htmlencode(codedString) + "<br />")
     response.write(deCodedString + "<br />")

     Encode = nothing

%>

Everything works except the line at the end (Encode = nothing).  That's when I get the error.  When I try to update the DLL, I have to restart my computer because it's not released!

Thank you all in advance!
Avatar of BigRat
BigRat
Flag of France image

How did you create the object? In VB? or C++? Or? Can you post the code?
Avatar of tncbbthositg
tncbbthositg

I created it in VB6.  I cant post the code as it would defeat the purpose.  Everything works fine beyond trying to release it.  It's hard to imagine that it doesnt want to be released.  I thought that maybe my code ends after running so the object doesnt remain instantiated.  Is it possible that the class is called and then released after returning the value?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of zeheb
zeheb

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fsiwrb

ASKER

nothinh?  Just set it to some random value?  Encode = ""?
Avatar of fsiwrb

ASKER

will that release the DLL so I can make recompile it without restarting my PC?
Oh, good call jeheb!  I was focusing on "Nothinh" instead of set.  I hate making dumb mistakes like that!