com - VB6 binary compatibility - adding new Events -


In a VB6 ActiveX exe project, if any events have been added, then there is no way to preserve GUID for events. is ?

Clearly, changing existing events breaks compatibility. Adding a new VB6 IDE does not cause a warning issue. It does not really surprise me, however, when you add new methods, but do not warn when at least current methods retain their GUID.

With the incidents, previous compatibility for existing people if new people are added later.

This is not a problem for the integrated VB6 application through COM; I think the VB runtime makes some mistakes, so that events can be raised without knowing the grid up-front through registration.

Where other app is .net (especially C #) and I have to declare the interface to implement Event Sync, I want the GUID to remain cautious to avoid coding again, whenever the VB6 app is increased I / F I neither in the VB6 app New- I can not know or care about the programs implemented - I want to continue using pre-existing ones without the need to change the dot source code.

Is there some VB6 trick I'm missing that would be able to do this?

The problem is that once defined a COM interface is irreversible.

Behind this scene, which creates a new version of the Visual Basic Com interface, update the version number, adds new methods and sets up the necessary information so that the new interface is automatically used with the old interface To be.

As it is indicated that the events are not done automatically, I see the Visual Studio OLE / CK object and see the GUID changes.

A hybrid VB6 /. A possible solution for NET is a bit of pain but whenever you make changes everything is clear before you need to use the OLE / COM object view to get the VL6 object IDL. Then use the MIDL compiler to generate typilibs. Use Typelib as your reference from now on.

You have to change the interface name because it will conflict with the VB6 name. The idea is that both the .NET and VB6 will reference the typelist and apply the interface. At any time you want to change the interface which changes you IDL, re-compose typedlib and implement the interface for both.

Now if it looks a bit complex and is going to be WFT! I do not blame you, but in my own conversion project, I found this useful in certain circumstances when VB6 stuff is still in ongoing development but you have to use it in NIT.

Now a standardized solution, minimum required identification and isolated interoperate for two components, say events and some appropriate things, generate IDL for that interface, compile typedlib, and use it as a reference. Please. I have also done this.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -