Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Change in dll trows runtime 430

Posted on 1999-07-11
Medium Priority
Last Modified: 2006-11-17
I have a project in VB6 with an ActiveX dll.
This is a demo with one class with one member:
After compiling and building I created a cab package and installed it on a computer. It runs fine.
Now I changes something in the dll and overwrite the dll with the new one on the target box. The only difference is that the one and member returns another string. Interface is the same, class is the same, everything is the same except for another size return of the string.
The app now trows an error that it could not find a matching interface. Interface is the same. Or is there another interface somewhere or are there other steps to be taken in stead of replacing the dll?
Question by:phiro
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
  • 3
  • 2

Accepted Solution

rmichels earned 200 total points
ID: 1523561
But you have changed the interface, if you have changed what is returned or a parameter on the function.

You have a couple of choices:

1) Rebuild the app, and connect it to the latest DLL interface and rebuild you CAB files.

2) Create a new function that returns the data you want, leaving the old function in place.  This should not create a "new" interface, since old app will still run against the existing DLL functions.  (of course that depends up what compatibility you are running).


Author Comment

ID: 1523562
Hi rMichels.
Thanx for answering my question.
I want to clarify my problem a bit,

My project was a test as to check into the behavior of the dll. I had one method in the class MyClass:

Public function Hallo() as String
  Hallo = "Hallo"
End Function

In the next version I replaced that with :

Public function Hallo() as String
  Hallo = "Hallo allemaal"
End Function

So you see, that neither signature nor the return value of the method is changed. As far as I know, there is no change in interface.
As to your possibilities you gave:
1)  I do not want to rebuild, i am experimenting with changes in functionality without recompiling the application. For instance, my dll hold the buisiness logic, and by replacing the dll I want to be able  to update the logic without doing something with the rest of the app.
2) An extra function would inply I need to introduce new calls from the app ergo, rebuilding it as well.

I do understand that perhaps this is not possible, or that I should use regular Dll's in stead of ActiveX dll.
Do you know more of this?

Regards PhiRo
LVL 10

Expert Comment

ID: 1523563

Sometimes VB just screws up like that, and the only solution is to break binary compatibility. A nuisance, but that's the way it is...

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.


Author Comment

ID: 1523564
Goeiemiddag Caraf_g

So it would appear I need to write this in a regular C dll... Too bad, there goes a fine idea. I will try to build a ActiveX exe and check whether the same behavior appears That sucks because it's performance is inferior to an in-process server. Or else I would have to encapsulate it all into a COM object. Do you have any experience with changing COM objects without recompiling the container app?

And rmichels? Any ideas?

Expert Comment

ID: 1523565
What compatibility option do you have set, under project settings?  You should set binary compatibility to avoid a new GUID being generated every time you compile.

You you are correct, you did not change the interface..I misunderstood your initial question.

Author Comment

ID: 1523566
That was it!
I still got the compatibility set  at project level. The interface of the ActiveX dll appears to have a CLSID as well. At project compaitibility this gets renewed as well
Mucho thanks!!


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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Suggested Courses

705 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