Solved

Incompatible exports - when?

Posted on 1998-07-27
2
168 Views
Last Modified: 2010-04-02
Can anyone give me all the rules for determining when objects exported in a DLL (classes, functions) are to lose their compatibility with a previous version (e.g. adding a function to a class)?
0
Comment
Question by:gil_mo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Accepted Solution

by:
alexo earned 40 total points
ID: 1168737
Whenever a VIRTUAL member function is added or deleted, the layout of the vtable changes, resulting in wrong member functions being called by the virtual dispatch mechanism.

Whenever any member is added/removed the size of the objects changes, resulting in new/delete operating on wrong memory sizes, leading to protection violations.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1168738
>> Whenever any member is added/removed the size of the objects
>> changes, resulting in new/delete operating on wrong memory sizes,
>> leading to protection violations.
Actually, you should recompile if you make and changes to the data members.  For example, if you swap the order of two data members.  This is because,  you might have code that dirrectly acceses the members (if they are public or if there is inline class code that does so)

Also note that if any of these changes are made to a base, class, then the derived classes must also be considered changed.

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question