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

C / C++ / MFC

 
GeneralRe: Again a callback question... m(__)m Pin
Mr.Freeze13-Feb-02 17:05
Mr.Freeze13-Feb-02 17:05 
GeneralRe: Again a callback question... m(__)m Pin
Lim Bio Liong13-Feb-02 18:08
Lim Bio Liong13-Feb-02 18:08 
GeneralRe: Again a callback question... m(__)m Pin
Mr.Freeze13-Feb-02 19:15
Mr.Freeze13-Feb-02 19:15 
GeneralRe: Again a callback question... m(__)m Pin
Lim Bio Liong13-Feb-02 22:58
Lim Bio Liong13-Feb-02 22:58 
GeneralRe: Again a callback question... m(__)m Pin
Mr.Freeze14-Feb-02 13:17
Mr.Freeze14-Feb-02 13:17 
GeneralRe: Again a callback question... m(__)m Pin
Lim Bio Liong14-Feb-02 20:54
Lim Bio Liong14-Feb-02 20:54 
GeneralRe: Again a callback question... m(__)m Pin
Joaquín M López Muñoz13-Feb-02 21:15
Joaquín M López Muñoz13-Feb-02 21:15 
GeneralRe: Again a callback question... m(__)m Pin
Lim Bio Liong13-Feb-02 22:46
Lim Bio Liong13-Feb-02 22:46 
Hello Joaquin,

Your suggestion is very good, Joaquin. Yes, the use of a Shared Data Section seems quite useful and may have great potential for Mr Freeze's problem. I tried using Shared Data Section with the following architecture :

1. App1 links with Shared DLL and calls setCallback(<pointer to CallBack Func() in App1>).

1.1 This sets "pMyDLLCallback" to the address of Callback Func in App1.

2. App2 links with Shared DLL and calls callCallback(<some value>).

2.1 This makes callCallback() call a function whose address is stored in "pMyDLLCallback".

There is a problem in 2.1 because the address in "pMyDLLCallback" points to is in the address space of App2. And App2 does not contain the Callback function in App1.

In this case, App2 will either crash or may execute some function which is not the same Callback function as that in App1. It may even dive straight into the middle of some function in itself.

Is my analysis correct, Joaquin ? Please let me know as I may have totally misunderstood your solution.

Many Thanks,
Bio.


GeneralRe: Again a callback question... m(__)m Pin
Joaquín M López Muñoz13-Feb-02 23:24
Joaquín M López Muñoz13-Feb-02 23:24 
GeneralRe: Again a callback question... m(__)m Pin
Lim Bio Liong13-Feb-02 23:52
Lim Bio Liong13-Feb-02 23:52 
GeneralRe: Again a callback question... m(__)m Pin
Mr.Freeze14-Feb-02 13:22
Mr.Freeze14-Feb-02 13:22 
GeneralImageList_Draw not working under XP Pin
David Wengier13-Feb-02 14:13
David Wengier13-Feb-02 14:13 
GeneralRe: ImageList_Draw not working under XP Pin
Tim Smith13-Feb-02 14:47
Tim Smith13-Feb-02 14:47 
GeneralRe: ImageList_Draw not working under XP Pin
David Wengier13-Feb-02 15:00
David Wengier13-Feb-02 15:00 
GeneralRe: ImageList_Draw not working under XP Pin
Tim Smith14-Feb-02 2:21
Tim Smith14-Feb-02 2:21 
GeneralRe: ImageList_Draw not working under XP Pin
Shog913-Feb-02 18:19
sitebuilderShog913-Feb-02 18:19 
GeneralRe: ImageList_Draw not working under XP Pin
David Wengier13-Feb-02 18:46
David Wengier13-Feb-02 18:46 
GeneralRe: ImageList_Draw not working under XP Pin
Shog914-Feb-02 6:59
sitebuilderShog914-Feb-02 6:59 
Generaldevstudio6 sub-projects only showing up for "debug" and "release" configs Pin
Jason De Arte13-Feb-02 11:46
Jason De Arte13-Feb-02 11:46 
GeneralRe: devstudio6 sub-projects only showing up for "debug" and "release" configs Pin
Tim Smith13-Feb-02 12:39
Tim Smith13-Feb-02 12:39 
GeneralGDI+ in ATL Control Pin
pattyweb13-Feb-02 10:39
pattyweb13-Feb-02 10:39 
GeneralNeed help with Regular expression replace Pin
Stephane Routelous13-Feb-02 10:18
Stephane Routelous13-Feb-02 10:18 
GeneralRe: Need help with Regular expression replace Pin
Michael Dunn13-Feb-02 10:43
sitebuilderMichael Dunn13-Feb-02 10:43 
GeneralRe: Need help with Regular expression replace Pin
moliate13-Feb-02 10:45
moliate13-Feb-02 10:45 
GeneralRe: Need help with Regular expression replace Pin
Stephane Routelous13-Feb-02 10:59
Stephane Routelous13-Feb-02 10:59 

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.