Click here to Skip to main content
15,915,086 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Passing structures using WM_COPYDATA between processes Pin
Tim Smith14-Nov-05 3:01
Tim Smith14-Nov-05 3:01 
QuestionSHBrowseForFolder Pin
Rage13-Nov-05 23:37
professionalRage13-Nov-05 23:37 
AnswerRe: SHBrowseForFolder Pin
*Dreamz14-Nov-05 0:08
*Dreamz14-Nov-05 0:08 
AnswerRe: SHBrowseForFolder Pin
David Crow14-Nov-05 2:40
David Crow14-Nov-05 2:40 
AnswerA long standing favorite... Pin
jhwurmbach14-Nov-05 3:06
jhwurmbach14-Nov-05 3:06 
QuestionDraw arc algorithm Pin
gandalf198313-Nov-05 23:21
gandalf198313-Nov-05 23:21 
AnswerRe: Draw arc algorithm Pin
Rajesh R Subramanian13-Nov-05 23:30
professionalRajesh R Subramanian13-Nov-05 23:30 
Questioncaveats when exporting classes from a dll? Pin
WernerP13-Nov-05 22:48
WernerP13-Nov-05 22:48 
Hi,

I am exporting classes from a dll, and I try to avoid recompiling the world, when the dll changes. I am feeling uncertain in that point and would greatly appreciate your advice.

I reckoned the only problem would arise when classes with virtual functions would be used by the client. I set up a little experiment with 3 classes A, B and C, with 3 virtual functions each. C inherits from B and B from A.

Found..
I can not change the order of virtual functions, nor can I insert one. The vftable entries seem to be permuted resp shifted by the number of insertions.

I can insert additional code into a function, so that the function entries in the map file have shifted adresses. But still the client works without recompiling. I thought it would crash, why not does it? I thought this would result in wrong vftable entries. Are these not generated at dll compile time?

These problems only seem occur when I use pointers to instances of these classes. I.e. as long as I do not pass any instance from a dll class via reference, or make a pointer to it, I will not have to recompile the client. True?



Best regards
Werner
AnswerRe: caveats when exporting classes from a dll? Pin
Steen Krogsgaard14-Nov-05 2:24
Steen Krogsgaard14-Nov-05 2:24 
GeneralRe: caveats when exporting classes from a dll? Pin
WernerP14-Nov-05 5:59
WernerP14-Nov-05 5:59 
GeneralRe: caveats when exporting classes from a dll? Pin
Steen Krogsgaard14-Nov-05 23:23
Steen Krogsgaard14-Nov-05 23:23 
AnswerRe: caveats when exporting classes from a dll? Pin
cmk14-Nov-05 12:56
cmk14-Nov-05 12:56 
GeneralRe: caveats when exporting classes from a dll? Pin
WernerP15-Nov-05 0:18
WernerP15-Nov-05 0:18 
GeneralRe: caveats when exporting classes from a dll? Pin
cmk15-Nov-05 0:47
cmk15-Nov-05 0:47 
QuestionWindow caption at center Pin
pc_dev13-Nov-05 22:44
pc_dev13-Nov-05 22:44 
AnswerRe: Window caption at center Pin
Roger Allen14-Nov-05 0:43
Roger Allen14-Nov-05 0:43 
GeneralRe: Window caption at center Pin
vikas amin14-Nov-05 1:28
vikas amin14-Nov-05 1:28 
AnswerRe: Window caption at center Pin
ThatsAlok14-Nov-05 1:12
ThatsAlok14-Nov-05 1:12 
AnswerRe: Window caption at center Pin
Arman S.14-Nov-05 1:12
Arman S.14-Nov-05 1:12 
QuestionDestination path ICopyHook Pin
ragavan13-Nov-05 22:17
ragavan13-Nov-05 22:17 
QuestionCButton SetFocus Pin
AORD13-Nov-05 21:00
AORD13-Nov-05 21:00 
AnswerRe: CButton SetFocus Pin
toxcct13-Nov-05 21:38
toxcct13-Nov-05 21:38 
GeneralRe: CButton SetFocus Pin
AORD14-Nov-05 18:23
AORD14-Nov-05 18:23 
GeneralRe: CButton SetFocus Pin
toxcct14-Nov-05 21:19
toxcct14-Nov-05 21:19 
AnswerRe: CButton SetFocus Pin
Rajesh R Subramanian13-Nov-05 23:20
professionalRajesh R Subramanian13-Nov-05 23:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.