COM object access error

Posted on 2005-04-19
Medium Priority
Last Modified: 2013-11-25
I have pulled in a dotnet dll via a COM type library into VB6. The problem that ive come across is when an error occurs and i shut down the vb6 app and restart it somehow the OLD COM object seem to be living in memory! I do create a new COM object on restart and call its methods but the object consistently remains in the previous unfunctional state and i cant get the com methods to execute properly. I set the COM object to NOTHING upon app shutdown and even put in a clean up routine in the dotnet dll to free all used resources within the dll, but nothing seems to de-reference the old COM object in memory.
The weird part is when this problem occurs if i shutdown the IDE and re-open the vb6 project  and run it, then it seems to work properly again. Even if i refresh the COM reference it works again. Can someone explain as to why this is occuring?
Question by:Programmers
1 Comment
LVL 10

Accepted Solution

Eduard Ghergu earned 2000 total points
ID: 13832112
Are you using late-binding for calling the dll library? If yes, try to use the "new" operator (earlier binding). Also, try to build application and run de exe file without IDE,

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Introduction to Processes
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

757 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