Click here to Skip to main content
16,006,378 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: read from file Pin
Christian Graus27-Jan-02 19:26
protectorChristian Graus27-Jan-02 19:26 
GeneralRe: read from file Pin
Nish Nishant27-Jan-02 19:37
sitebuilderNish Nishant27-Jan-02 19:37 
GeneralRe: read from file Pin
Christian Graus27-Jan-02 20:12
protectorChristian Graus27-Jan-02 20:12 
GeneralRe: read from file Pin
Christian Graus27-Jan-02 16:54
protectorChristian Graus27-Jan-02 16:54 
GeneralRe: read from file Pin
Jamie Hale28-Jan-02 5:05
Jamie Hale28-Jan-02 5:05 
GeneralRe: read from file Pin
Christian Graus28-Jan-02 8:44
protectorChristian Graus28-Jan-02 8:44 
GeneralInstalling a callback between two applications Pin
Mr.Freeze27-Jan-02 15:52
Mr.Freeze27-Jan-02 15:52 
GeneralRe: Installing a callback between two applications Pin
27-Jan-02 16:09
suss27-Jan-02 16:09 
You do not need to worry about the OS moving your application around in memory because you only deal with a virtual address, and that will not change, however, the virtual address that you receive in process A will not be valid in process B. This makes calling a callback function not as simple as you would think.

You will need to do some form of inter-process Communication (IPC).

There are a number of ways that you can do this including, I listed these in an order of difficulty from easiest to most difficult:

Send a message to the second process and the message handler will call the function for you.

Create a COM object.

Use a memory mapped file to communicate between the two applications, monitor the data that is written in to the file and take appropriate actions.

Use a Remote Procedure Call (RPC). This is a networking mechanism that will scale to applications located on other machines, probably overkill in your case.

I would suggest the message mechanism. This is the same mechanism that you would probably use in a multi-threaded application.

Kilowatt


GeneralRe: Installing a callback between two applications Pin
Mr.Freeze27-Jan-02 17:47
Mr.Freeze27-Jan-02 17:47 
GeneralRe: Installing a callback between two applications Pin
27-Jan-02 18:39
suss27-Jan-02 18:39 
Generalread from file Pin
marouane miftah el kheir27-Jan-02 15:27
marouane miftah el kheir27-Jan-02 15:27 
GeneralRandom Numbers :: C++ Pin
valikac27-Jan-02 15:00
valikac27-Jan-02 15:00 
GeneralRe: Random Numbers :: C++ Pin
Michael Dunn27-Jan-02 17:22
sitebuilderMichael Dunn27-Jan-02 17:22 
GeneralRe: Random Numbers :: C++ Pin
markkuk27-Jan-02 19:44
markkuk27-Jan-02 19:44 
GeneralRe: Random Numbers :: C++ Pin
valikac28-Jan-02 4:37
valikac28-Jan-02 4:37 
GeneralHelp with Win32, but its in the VB forum Pin
David Wengier27-Jan-02 14:53
David Wengier27-Jan-02 14:53 
Generalplease help me this is urgent Pin
borland27-Jan-02 14:50
borland27-Jan-02 14:50 
GeneralRe: please help me this is urgent Pin
27-Jan-02 15:13
suss27-Jan-02 15:13 
GeneralRe: please help me this is urgent Pin
Michael Dunn27-Jan-02 17:19
sitebuilderMichael Dunn27-Jan-02 17:19 
Questioninput reading? Pin
marouane miftah el kheir27-Jan-02 13:00
marouane miftah el kheir27-Jan-02 13:00 
AnswerRe: input reading? Pin
borland27-Jan-02 14:52
borland27-Jan-02 14:52 
Questionreturning arrays? Pin
marouane miftah el kheir27-Jan-02 11:18
marouane miftah el kheir27-Jan-02 11:18 
AnswerRe: returning arrays? Pin
Matt Gullett27-Jan-02 11:25
Matt Gullett27-Jan-02 11:25 
GeneralRe: returning arrays? Pin
Nemanja Trifunovic27-Jan-02 12:12
Nemanja Trifunovic27-Jan-02 12:12 
GeneralRe: returning arrays? Pin
Matt Gullett27-Jan-02 12:27
Matt Gullett27-Jan-02 12:27 

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.