Solved

retain in memory issues with vb6 dll

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

746 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

11 Experts available now in Live!

Get 1:1 Help Now