binary compatibility 
Author Message
 binary compatibility

i built a simple COM component compiled with binary compatiblity set to version that is in production.  it had a single function:

Public Function GetInfo(ByVal cArg1 as String, ByVal cArg2 as String) as String

...code here...

End Function

i then needed to accept a third argument so i made the following modification:

Public Function GetInfo(ByVal cArg1 as String, ByVal cArg2 as String, Optional ByVal cArg3) as String

...code here...

End Function

when i compile, the compiler tells me that binary compatibility would be broken.  i am confused.  i thought one of the benefits of OPTIONAL is to be able to maintain binary compatibity between versions.

comments appreciated...

thanks,
joe



Fri, 16 Jul 2004 01:32:50 GMT  
 binary compatibility
no!

go to my website and read the article about compatibility

--

Enterprise Development: http://www.dev-purgatory.org/


when i compile, the compiler tells me that binary compatibility would be
broken.  i am confused.  i thought one of the benefits of OPTIONAL is to be
able to maintain binary compatibity between versions.

comments appreciated...

thanks,
joe



Fri, 16 Jul 2004 04:33:50 GMT  
 binary compatibility

If you change your interface, binary compatiblity will be broken.  This is because the GUID of the interface changes.

--
Jim
Jimco Add-ins
Freeware add-ins and utilities for Microsoft FrontPage
http://www.jimcoaddins.com


  i built a simple COM component compiled with binary compatiblity set to version that is in production.  it had a single function:

  Public Function GetInfo(ByVal cArg1 as String, ByVal cArg2 as String) as String

  ...code here...

  End Function

  i then needed to accept a third argument so i made the following modification:

  Public Function GetInfo(ByVal cArg1 as String, ByVal cArg2 as String, Optional ByVal cArg3) as String

  ...code here...

  End Function

  when i compile, the compiler tells me that binary compatibility would be broken.  i am confused.  i thought one of the benefits of OPTIONAL is to be able to maintain binary compatibity between versions.

  comments appreciated...

  thanks,
  joe



Fri, 16 Jul 2004 11:45:05 GMT  
 binary compatibility
Adding an optional parameter is not binary compatible.

http://users.skynet.be/wvdd2/General_techniques/Compiling/Binary_Comp...
Changes/binary_compatible_changes.html

--
Van den Driessche Willy
For a work in progress :
http://users.skynet.be/wvdd2/index.html

i built a simple COM component compiled with binary compatiblity set to
version that is in production.  it had a single function:

Public Function GetInfo(ByVal cArg1 as String, ByVal cArg2 as String) as
String

...code here...

End Function

i then needed to accept a third argument so i made the following
modification:

Public Function GetInfo(ByVal cArg1 as String, ByVal cArg2 as String,
Optional ByVal cArg3) as String

...code here...

End Function

when i compile, the compiler tells me that binary compatibility would be
broken.  i am confused.  i thought one of the benefits of OPTIONAL is to be
able to maintain binary compatibity between versions.

comments appreciated...

thanks,
joe



Fri, 16 Jul 2004 15:18:20 GMT  
 binary compatibility
hi,

Binary Compatibility: When you compile the project, if any
binary-incompatible changes are detected you will be presented with a
warning dialog. If you choose to accept the warning, the component will
retain the type library identifier and the class IDs. Interface IDs are
changed only for classes that are no longer binary-compatible. This is the
same behavior as Project Compatibility.

If, however, you choose to ignore the warning, the component will also
maintain the interface IDs. This option is only available when the compiler
determines that the change was in the procedure ID or signature of a method.

Caution   You should only choose the Ignore button if you are absolutely
sure that the changes you have made won't break compatibility. If you aren't
absolutely sure, take the safe alternative and choose the Accept button to
allow the interface ID's to be changed.

The above three paragraph are from MSDN. It clearly states that when we
change the signature of the function the IID will change. Only the CLSID
will remain unchanged.

Regards,
Satish



Sun, 18 Jul 2004 17:35:10 GMT  
 binary compatibility
no, it says if u ignore the warning the IID will be the same, but older
client may cause an GPF when calling this method

--

Enterprise Development: http://www.dev-purgatory.org/


Quote:
> The above three paragraph are from MSDN. It clearly states that when we
> change the signature of the function the IID will change. Only the CLSID
> will remain unchanged.



Sun, 18 Jul 2004 20:35:40 GMT  
 binary compatibility
Hi,
           When we set Binary Compatibility and change the signature of the
function, VB will raise a warning. If you accept the warning new IID will be
created. If you ignore the warning it will retain the old IID.

Regards,
Satish



Mon, 19 Jul 2004 12:19:10 GMT  
 binary compatibility
Yes it will, but apps attempting to use the old interface will still be
broken.

--
Jim
Jimco Add-ins
Freeware add-ins and utilities for Microsoft FrontPage
http://www.jimcoaddins.com


Quote:
> Hi,
>            When we set Binary Compatibility and change the signature of
the
> function, VB will raise a warning. If you accept the warning new IID will
be
> created. If you ignore the warning it will retain the old IID.

> Regards,
> Satish



Mon, 19 Jul 2004 12:29:28 GMT  
 binary compatibility
did i say something other?

--

Enterprise Development: http://www.dev-purgatory.org/


Quote:
> Hi,
>            When we set Binary Compatibility and change the signature of
the
> function, VB will raise a warning. If you accept the warning new IID will
be
> created. If you ignore the warning it will retain the old IID.

> Regards,
> Satish



Mon, 19 Jul 2004 18:31:43 GMT  
 binary compatibility
not necessarily, depends on the new vtable layout, offen only the changed
method will crash

--

Enterprise Development: http://www.dev-purgatory.org/


Quote:
> Yes it will, but apps attempting to use the old interface will still be
> broken.

> --
> Jim
> Jimco Add-ins
> Freeware add-ins and utilities for Microsoft FrontPage
> http://www.jimcoaddins.com



> > Hi,
> >            When we set Binary Compatibility and change the signature of
> the
> > function, VB will raise a warning. If you accept the warning new IID
will
> be
> > created. If you ignore the warning it will retain the old IID.

> > Regards,
> > Satish



Mon, 19 Jul 2004 18:33:24 GMT  
 binary compatibility
Did I say something other?   :)

--
Jim
Jimco Add-ins
Freeware add-ins and utilities for Microsoft FrontPage
http://www.jimcoaddins.com


Quote:
> not necessarily, depends on the new vtable layout, offen only the changed
> method will crash

> --

> Enterprise Development: http://www.dev-purgatory.org/



> > Yes it will, but apps attempting to use the old interface will still be
> > broken.

> > --
> > Jim
> > Jimco Add-ins
> > Freeware add-ins and utilities for Microsoft FrontPage
> > http://www.jimcoaddins.com



> > > Hi,
> > >            When we set Binary Compatibility and change the signature
of
> > the
> > > function, VB will raise a warning. If you accept the warning new IID
> will
> > be
> > > created. If you ignore the warning it will retain the old IID.

> > > Regards,
> > > Satish



Mon, 19 Jul 2004 19:52:18 GMT  
 binary compatibility
yes, u talked about the interface - i talked about a single method in an
interface

--

Enterprise Development: http://www.dev-purgatory.org/


Quote:
> Did I say something other?   :)

> --
> Jim
> Jimco Add-ins
> Freeware add-ins and utilities for Microsoft FrontPage
> http://www.jimcoaddins.com



> > not necessarily, depends on the new vtable layout, offen only the
changed
> > method will crash

> > --

> > Enterprise Development: http://www.dev-purgatory.org/



> > > Yes it will, but apps attempting to use the old interface will still
be
> > > broken.

> > > --
> > > Jim
> > > Jimco Add-ins
> > > Freeware add-ins and utilities for Microsoft FrontPage
> > > http://www.jimcoaddins.com



> > > > Hi,
> > > >            When we set Binary Compatibility and change the signature
> of
> > > the
> > > > function, VB will raise a warning. If you accept the warning new IID
> > will
> > > be
> > > > created. If you ignore the warning it will retain the old IID.

> > > > Regards,
> > > > Satish



Mon, 19 Jul 2004 23:31:08 GMT  
 binary compatibility
If you change a method in your interface, the interface has changed.

--
Jim
Jimco Add-ins
Freeware add-ins and utilities for Microsoft FrontPage
http://www.jimcoaddins.com


Quote:
> yes, u talked about the interface - i talked about a single method in an
> interface

> --

> Enterprise Development: http://www.dev-purgatory.org/



> > Did I say something other?   :)

> > --
> > Jim
> > Jimco Add-ins
> > Freeware add-ins and utilities for Microsoft FrontPage
> > http://www.jimcoaddins.com



> > > not necessarily, depends on the new vtable layout, offen only the
> changed
> > > method will crash

> > > --

> > > Enterprise Development: http://www.dev-purgatory.org/



> > > > Yes it will, but apps attempting to use the old interface will still
> be
> > > > broken.

> > > > --
> > > > Jim
> > > > Jimco Add-ins
> > > > Freeware add-ins and utilities for Microsoft FrontPage
> > > > http://www.jimcoaddins.com



> > > > > Hi,
> > > > >            When we set Binary Compatibility and change the
signature
> > of
> > > > the
> > > > > function, VB will raise a warning. If you accept the warning new
IID
> > > will
> > > > be
> > > > > created. If you ignore the warning it will retain the old IID.

> > > > > Regards,
> > > > > Satish



Tue, 20 Jul 2004 07:22:11 GMT  
 binary compatibility
jesus... we talked about the IID not the interface at all

--

Enterprise Development: http://www.dev-purgatory.org/


Quote:
> If you change a method in your interface, the interface has changed.

> --
> Jim
> Jimco Add-ins
> Freeware add-ins and utilities for Microsoft FrontPage
> http://www.jimcoaddins.com



> > yes, u talked about the interface - i talked about a single method in an
> > interface

> > --

> > Enterprise Development: http://www.dev-purgatory.org/



> > > Did I say something other?   :)

> > > --
> > > Jim
> > > Jimco Add-ins
> > > Freeware add-ins and utilities for Microsoft FrontPage
> > > http://www.jimcoaddins.com



> > > > not necessarily, depends on the new vtable layout, offen only the
> > changed
> > > > method will crash

> > > > --

> > > > Enterprise Development: http://www.dev-purgatory.org/



> > > > > Yes it will, but apps attempting to use the old interface will
still
> > be
> > > > > broken.

> > > > > --
> > > > > Jim
> > > > > Jimco Add-ins
> > > > > Freeware add-ins and utilities for Microsoft FrontPage
> > > > > http://www.jimcoaddins.com



> > > > > > Hi,
> > > > > >            When we set Binary Compatibility and change the
> signature
> > > of
> > > > > the
> > > > > > function, VB will raise a warning. If you accept the warning new
> IID
> > > > will
> > > > > be
> > > > > > created. If you ignore the warning it will retain the old IID.

> > > > > > Regards,
> > > > > > Satish



Tue, 20 Jul 2004 19:12:20 GMT  
 binary compatibility
Right you are.  I must have imagined it.

Oh, you don't have to call me Jesus.  Jim will do.  :)

--
Jim
Jimco Add-ins
Freeware add-ins and utilities for Microsoft FrontPage
http://www.jimcoaddins.com


Quote:
> jesus... we talked about the IID not the interface at all

> --

> Enterprise Development: http://www.dev-purgatory.org/



> > If you change a method in your interface, the interface has changed.

> > --
> > Jim
> > Jimco Add-ins
> > Freeware add-ins and utilities for Microsoft FrontPage
> > http://www.jimcoaddins.com



> > > yes, u talked about the interface - i talked about a single method in
an
> > > interface

> > > --

> > > Enterprise Development: http://www.dev-purgatory.org/



> > > > Did I say something other?   :)

> > > > --
> > > > Jim
> > > > Jimco Add-ins
> > > > Freeware add-ins and utilities for Microsoft FrontPage
> > > > http://www.jimcoaddins.com



> > > > > not necessarily, depends on the new vtable layout, offen only the
> > > changed
> > > > > method will crash

> > > > > --

> > > > > Enterprise Development: http://www.dev-purgatory.org/



> > > > > > Yes it will, but apps attempting to use the old interface will
> still
> > > be
> > > > > > broken.

> > > > > > --
> > > > > > Jim
> > > > > > Jimco Add-ins
> > > > > > Freeware add-ins and utilities for Microsoft FrontPage
> > > > > > http://www.jimcoaddins.com



> > > > > > > Hi,
> > > > > > >            When we set Binary Compatibility and change the
> > signature
> > > > of
> > > > > > the
> > > > > > > function, VB will raise a warning. If you accept the warning
new
> > IID
> > > > > will
> > > > > > be
> > > > > > > created. If you ignore the warning it will retain the old IID.

> > > > > > > Regards,
> > > > > > > Satish



Tue, 20 Jul 2004 19:44:47 GMT  
 
 [ 15 post ] 

 Relevant Pages 

1. Binary Compatibility in VBA project

2. binary compatibility

3. Binary Compatibility

4. binary compatibility - class module found

5. New article on maintaining binary compatibility

6. binary compatibility issues

7. Binary Compatibility Question

8. Binary compatibility

9. Binary compatibility

10. Binary compatibility ?

11. Bug in Binary Compatibility

12. Binary compatibility question

 

 
Powered by phpBB® Forum Software