Hi Sheng,
Yes I am using both classes and interfaces. I could have gone with the
interface route for the SDK design, but chose not to for several reasons the
primary one being that this is a wrapper around our native C++ SDK and I
wanted the code to match the native C++ style as close as possible.
Even if this was a mistake in the design of the SDK for a class library, the
class library for the initial release of our product is already out there
and being used by a large number of commercial plug-in applications. So... I
really would like to understand if adding virtual functions to classes in my
library has adverse effects on the existing plug-ins.
Thanks,
-Steve
Steve Baer
Robert McNeel & Associates
"Sheng Jiang[MVP]" <sh*********@hotmail.com.discusswrote in message
news:uQ**************@TK2MSFTNGP06.phx.gbl...
Are you using class as your interface? Why don't you extract some
interface
from your class library, so you don't need to worry about memory layout
and
virtual tables?
--
Sheng Jiang
Microsoft MVP in VC++
"Steve Baer" <st***@mcneel.comwrote in message
news:61**********************************@microsof t.com...
>I've already tested this with C# and it works, but I'm being paranoid and
I
>wanted to also check here.
Our application has a large class library written in C++/CLI for plug-in
projects. The original library was written in C++ and the general rule
for
not breaking our SDK is to not change the class size by adding member
variables and to not add virtual functions because this will change the
vtable for the class. This is fine and we know how to deal with this on
the
>good old native C++ side, but when it comes to the .NET class library I'm
a
>little confused.
It appears that I can break this rule for .NET class libraries (probably
because everything is actually in IL). Is this true that I can add
virtual
functions and member variables to classes in a C++/CLI class library and
not
>break the functionality of assemblies that were built against the older
version of the class library?
Thanks,
-Steve
Steve Baer
Robert McNeel & Associates