Solved

Incompatible exports - when?

Posted on 1998-07-27
2
167 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

739 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