Link to home
Start Free TrialLog in
Avatar of phiro
phiro

asked on

Change in dll trows runtime 430

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?
ASKER CERTIFIED SOLUTION
Avatar of rmichels
rmichels

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of phiro
phiro

ASKER

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
Helaas,

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...

Sorry!
Avatar of phiro

ASKER

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?
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.
Avatar of phiro

ASKER

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!!