Solved

retain in memory issues with vb6 dll

Posted on 2003-12-02
1
488 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Use Multiple Forms 4 48
VB6 Compile Compatibility Issue 4 88
Sending a email via excel using vba 6 71
Excel - Save a copy of work book 13 82
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

911 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

16 Experts available now in Live!

Get 1:1 Help Now