Solved

retain in memory issues with vb6 dll

Posted on 2003-12-02
1
498 Views
Last Modified: 2013-12-25
So here it goes,

the VB6 dll is being accessed by java objects via a wrapper (but I do not think this is an issue, but I add it in for completeness).

I have a dll that was constructed in vb6 call hello.dll (for instance).

I have been able to run this dll from various objects of various classes for almost a month straight, then all of a sudden no object could access the dll.  Although the objects were not faulting they were experiencing issues in accessing the data.

Upon further investigation the "retain in memory" option was not chosen, and following some advise that I found on the net, set this variable, recompiled, and re-issued the dll.

Now I was able to recompile the java code and attempt to re-instantiate the objects (put them online).  To my supprise 2 out of the three class types liked the new dll, and the objects of those types came online.  The third class type had faulted objects.  hmmm...they all make the same call to the same dll?  

the error I was recieving indicated and accessing issue.

So in my infinite wisdom, I recompiled the dll without the "retain in memory" option checked and viola everybody loves the dll.  Except of course I do not trust the longevity of the interaction between the dll and the various objects.

So I retested and checked the "retain in memory" option and once again experienced the same faulting situation with the same objects.

I thought it was perhaps first come first serve, but I dispelled this theory by first trying to bring online the objects of the troublesome class.  With the same result.

so what I did to bandade the issue was construct a separate dll (with the "retain in memory" option checked) using the same code under a different name.  This time the objects of the second class type (now pointing to the new dll) loved the dll and came online without faulting???

Other than having two dll's and having to compile two separate dll's each time I make an upgrade, the system seems to perform as expected.

It just bothers me that this situation exists.

any suggestions?

whodaman
0
Comment
Question by:victoresq
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 26

Accepted Solution

by:
EDDYKT earned 125 total points
ID: 9861119
I expect some registry doesn't clear properly after you do regsvr32 /u

Or you GUID has been changed

If the problem occurs again, just uninstall your dll and open

regedit to look for your dll name. Delete all entries and re-register your dll
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month7 days, 11 hours left to enroll

632 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