COM object access error

Posted on 2005-04-19
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

    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

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    This video teaches viewers about errors in exception handling.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now