Click here to Skip to main content
15,913,115 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalneed help in linking two pages Pin
Member 118298220-Jul-04 15:40
Member 118298220-Jul-04 15:40 
GeneralRe: need help in linking two pages Pin
Johan Rosengren21-Jul-04 0:40
Johan Rosengren21-Jul-04 0:40 
Generalchat window BG Pin
ANDYFA20-Jul-04 14:19
ANDYFA20-Jul-04 14:19 
GeneralRe: chat window BG Pin
Antti Keskinen20-Jul-04 23:07
Antti Keskinen20-Jul-04 23:07 
GeneralDlls, callbacks and function pointers Pin
Irenepower20-Jul-04 10:51
Irenepower20-Jul-04 10:51 
GeneralRe: Dlls, callbacks and function pointers Pin
Antti Keskinen20-Jul-04 11:43
Antti Keskinen20-Jul-04 11:43 
GeneralRe: Dlls, callbacks and function pointers Pin
Member 124998021-Jul-04 3:37
Member 124998021-Jul-04 3:37 
GeneralRe: Dlls, callbacks and function pointers Pin
Antti Keskinen21-Jul-04 3:54
Antti Keskinen21-Jul-04 3:54 
Humm..

It seems here that each textUI.exe executable creates a new object of the CListener class ? Is this correct ?
So, could there be a reason why you wouldn't just pass around a pointer to the object itself ? Like, the executable that loads the DLL provides a function that will return the address of the local CListener object ? If the DLL is aware of the declaration of CListener, you can use the returned address as a standard pointer-to-class to call the member functions.

This way, you wouldn't need a pointer to the member function, but would have a pointer to the entire class. The pointer's size wouldn't change much, so the memory requirements would be held in check.

Naturally, this approach would place more strict design issues on the DLL code, especially if different functions of the class need to be called at different times. Perhaps you should increase the struct so that in addition to the pointer and the reference number, it would contain a flag that specifies the function to call ?

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: Dlls, callbacks and function pointers Pin
Member 124998021-Jul-04 4:59
Member 124998021-Jul-04 4:59 
GeneralRe: Dlls, callbacks and function pointers Pin
Antti Keskinen21-Jul-04 7:21
Antti Keskinen21-Jul-04 7:21 
GeneralRe: Dlls, callbacks and function pointers Pin
Antti Keskinen21-Jul-04 8:21
Antti Keskinen21-Jul-04 8:21 
GeneralRe: Dlls, callbacks and function pointers Pin
Member 124998021-Jul-04 10:11
Member 124998021-Jul-04 10:11 
GeneralRe: Dlls, callbacks and function pointers Pin
-Irenepower22-Jul-04 2:41
suss-Irenepower22-Jul-04 2:41 
GeneralCopyFile Error on XP Pin
Timothy Grabrian20-Jul-04 10:15
professionalTimothy Grabrian20-Jul-04 10:15 
GeneralRe: CopyFile Error on XP Pin
gamitech20-Jul-04 11:13
gamitech20-Jul-04 11:13 
GeneralRe: CopyFile Error on XP Pin
P-Rex20-Jul-04 20:15
P-Rex20-Jul-04 20:15 
GeneralRe: CopyFile Error on XP Pin
Timothy Grabrian21-Jul-04 11:15
professionalTimothy Grabrian21-Jul-04 11:15 
GeneralI need Help on Database Programming!!! Pin
Member 123981320-Jul-04 10:03
Member 123981320-Jul-04 10:03 
GeneralRe: I need Help on Database Programming!!! Pin
David Crow20-Jul-04 10:33
David Crow20-Jul-04 10:33 
GeneralCreating ActiveX control (variable types) Pin
BlackDice20-Jul-04 9:26
BlackDice20-Jul-04 9:26 
Generalwindow message Pin
Anonymous20-Jul-04 9:10
Anonymous20-Jul-04 9:10 
GeneralRe: window message Pin
Alexander Wiseman20-Jul-04 9:21
Alexander Wiseman20-Jul-04 9:21 
GeneralRe: window message Pin
Anonymous20-Jul-04 9:35
Anonymous20-Jul-04 9:35 
GeneralRe: window message Pin
Alexander Wiseman20-Jul-04 11:29
Alexander Wiseman20-Jul-04 11:29 
GeneralRe: window message Pin
Bob Stanneveld20-Jul-04 12:58
Bob Stanneveld20-Jul-04 12:58 

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.