Hi all,
I have a query about that dreaded subject of binary compatibility, as I'm
expreiencing strange behaviour.
We have two dlls which have been binary compatible for quite some time now,
any in-compatibilities addressed by updating the compat version with the new
dll etc and all was fine, until recently when a change was made to a no of
methods where the interface was modified by adding an new optional param.
When we re-compiled VB informed us that it was in-compatible and we where
presented with the usual dialogue where we could go ahead and break
compatibility but also had the option of preserving compatibility which we
selected and recompiled, and so later in our test env this went bang!, only
getting around the problem by either recompiling both dlls (which I couldn't
understand as I had chosen to preserve compatibility), or by treating the dll
as though compatibility had been broken and going the thru the process of
re-compiling, preserving and updating the compat dll with the updated.
So what I guess I'm asking is does preserve compatibility do what it says on
the tin, or does it only work for certain changes or not at all.
If anyone’s got any ideas/info I’d love to hear 'em as it seems if a
compatibility issue arises with either the option of breaking AND preserving,
whichever you choose you must always update the compat dll to ensure the dlls
are still compatible with previous versions.
Thanks in advance,
Stephen.
Ken Halter - 25 Oct 2004 19:02 GMT
> Hi all,
>
[quoted text clipped - 5 lines]
> dll etc and all was fine, until recently when a change was made to a no of
> methods where the interface was modified by adding an new optional param.
Yep... they're broken. Even something as small as changing....
Public Sub This(ARG as String)
...to...
Public Sub This(Arg as String)
...will break compatibility.
I've never successfully used the Preserve option. If you really want to
get into the "guts" of binary compatibility, you'll probably want to grab...
Advanced Visual Basic 6
Power Techniques for Everyday Programs
http://www.powervb.com
For the basics, there's....
Binary Compatibility
http://www.vbsight.com/BinaryComp.htm

Signature
Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep all discussions in the groups..