Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Cannot release ActiveX dll

Posted on 2003-03-06
6
Medium Priority
?
246 Views
Last Modified: 2008-02-01
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!
0
Comment
Question by:fsiwrb
6 Comments
 
LVL 27

Expert Comment

by:BigRat
ID: 8080657
How did you create the object? In VB? or C++? Or? Can you post the code?
0
 
LVL 8

Expert Comment

by:tncbbthositg
ID: 8080924
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
0
 
LVL 1

Accepted Solution

by:
zeheb earned 300 total points
ID: 8081584
Just change the line from Encode = Nothing to Set Encode = Nothinh and it should work.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:fsiwrb
ID: 8082869
nothinh?  Just set it to some random value?  Encode = ""?
0
 

Author Comment

by:fsiwrb
ID: 8082876
will that release the DLL so I can make recompile it without restarting my PC?
0
 
LVL 8

Expert Comment

by:tncbbthositg
ID: 8083945
Oh, good call jeheb!  I was focusing on "Nothinh" instead of set.  I hate making dumb mistakes like that!
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
The viewer will learn how to count occurrences of each item in an array.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question