Solved

retain in memory issues with vb6 dll

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

807 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