Re: Modifying Class Library
- From: "Sheng Jiang[MVP]" <sheng_jiang@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 3 Jul 2007 13:02:30 -0500
In .net you can extend your class and add virtual functions in a way like
..Net BCL 2.0 did to .Net 1.0. .Net 1.0 assemblies can be referenced and run
in .Net 2.0 applications.
--
Sheng Jiang
Microsoft MVP in VC++
"Steve Baer" <steve@xxxxxxxxxx> wrote in message
news:51451F5E-AF7E-45FC-9470-1B5CF72972CC@xxxxxxxxxxxxxxxx
Hi Sheng,the
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
primary one being that this is a wrapper around our native C++ SDK and Ithe
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,
class library for the initial release of our product is already out thereI
and being used by a large number of commercial plug-in applications. So...
really would like to understand if adding virtual functions to classes inmy
library has adverse effects on the existing plug-ins.and
Thanks,
-Steve
Steve Baer
Robert McNeel & Associates
"Sheng Jiang[MVP]" <sheng_jiang@xxxxxxxxxxxxxxxxxxx> wrote in message
news:uQMmKIZvHHA.4332@xxxxxxxxxxxxxxxxxxxxxxx
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" <steve@xxxxxxxxxx> wrote in message
news:61F40D1B-72B7-40B6-94C2-F6C37B286AB1@xxxxxxxxxxxxxxxx
I've already tested this with C# and it works, but I'm being paranoid
plug-inI
wanted to also check here.
Our application has a large class library written in C++/CLI for
I'mprojects. The original library was written in C++ and the general rulethe
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
good old native C++ side, but when it comes to the .NET class library
(probablya
little confused.
It appears that I can break this rule for .NET class libraries
andbecause 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
not
break the functionality of assemblies that were built against the older
version of the class library?
Thanks,
-Steve
Steve Baer
Robert McNeel & Associates
.
- Follow-Ups:
- Re: Modifying Class Library
- From: Steve Baer
- Re: Modifying Class Library
- References:
- Re: Modifying Class Library
- From: Sheng Jiang[MVP]
- Re: Modifying Class Library
- From: Steve Baer
- Re: Modifying Class Library
- Prev by Date: Re: Modifying Class Library
- Next by Date: Platform SDK for Visual Studio 2005
- Previous by thread: Re: Modifying Class Library
- Next by thread: Re: Modifying Class Library
- Index(es):
Relevant Pages
|