Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

Incompatible exports - when?

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
gil_mo
Asked:
gil_mo
1 Solution
 
alexoCommented:
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
 
nietodCommented:
>> 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now