|
-
December 7th, 2001, 11:01 AM
#1
exe/dll data exchange
I've got a questuion: i have exe program which creates window(non MFC) and this programm loads dll, which creates another window. Both windows have edit controls. I need to do followng: as far as i change text in edit in dll window, i need to output same text in edit in exe window. There is a pointer (char*) in dll where i store text which is to be output in dll edit. How to access to this pointer from exe window (and make this pointer common for both windows - something like buffer). Probably I need to declare this pointer as dllexport but I don't know how to work with it then. Please somebody give example of solving such problem (using imported variables!). Thanks
-
December 9th, 2001, 02:34 PM
#2
Re: exe/dll data exchange
I would create an exported function in your DLL which returns a char** (a pointer to the char *), and in this return value pass the address of your char * to your EXE file.
-
December 9th, 2001, 02:47 PM
#3
Re: exe/dll data exchange
and if I need to get pointer to int** (for example there is some matrix) - i should return int*** - or i didn't understand something?
-
December 9th, 2001, 04:36 PM
#4
Re: exe/dll data exchange
yes, a pointer to an int** is a int***. Every * means pointer, and you can have many levels of pointers..... i.e. a pointer to a pointer....
if your char * you want to pass to your EXE is a constant, i.e. the pointer does not change, then it is sufficient to pass it to your EXE by value, not by pointer (char **).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|