Click here to Skip to main content
15,919,613 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MDI VC++, How to pass parameters to view? Pin
david_gilmour27-Nov-04 13:05
david_gilmour27-Nov-04 13:05 
GeneralRe: MDI VC++, How to pass parameters to view? Pin
John R. Shaw27-Nov-04 16:53
John R. Shaw27-Nov-04 16:53 
QuestionHow can a DLL execute a function of the main app? Pin
Dominik Reichl27-Nov-04 5:22
Dominik Reichl27-Nov-04 5:22 
AnswerRe: How can a DLL execute a function of the main app? Pin
peterchen27-Nov-04 5:47
peterchen27-Nov-04 5:47 
General? Re: How can a DLL execute a function of the main app? ? Pin
Dominik Reichl27-Nov-04 5:56
Dominik Reichl27-Nov-04 5:56 
GeneralRe: ? Re: How can a DLL execute a function of the main app? ? Pin
John R. Shaw27-Nov-04 19:04
John R. Shaw27-Nov-04 19:04 
General? Re: ? Re: How can a DLL execute a function of the main app? ? ? Pin
Dominik Reichl27-Nov-04 23:00
Dominik Reichl27-Nov-04 23:00 
GeneralRe: ? Re: ? Re: How can a DLL execute a function of the main app? ? ? Pin
Neville Franks28-Nov-04 0:43
Neville Franks28-Nov-04 0:43 
I have looked into this quite some time back and I'm afraid I can't remember what the outcome was, but I vaguely recall it was possible. You need to create a lib for the .exe and use that in the DLL. Also declare the functions as exported.

One issue that comes to mind though is DLL's are (can be) shared by .EXE's so which EXE would the exported function be in. I guess this info lives in the export information.

Another way to do this is for the .EXE to expose an array of functions DLL's can call. You could do this with delegates and probably signals and slots. Have a look at the truly excellent FastDelegate here on CP.

In my programmers editor (see sig) I enabled interpreted C functions to call C/C++ functions in my .EXE. This is done by my C compiler resolving function addresses via. the .EXE's MAP file. This works very well and allows extensions to the editor to do most anything that the .exe can.

Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
GeneralRe: ? Re: ? Re: How can a DLL execute a function of the main app? ? ? Pin
Dominik Reichl28-Nov-04 1:50
Dominik Reichl28-Nov-04 1:50 
GeneralRe: ? Re: ? Re: How can a DLL execute a function of the main app? ? ? Pin
John R. Shaw28-Nov-04 8:08
John R. Shaw28-Nov-04 8:08 
GeneralRe: ? Re: ? Re: How can a DLL execute a function of the main app? ? ? Pin
Neville Franks28-Nov-04 11:16
Neville Franks28-Nov-04 11:16 
GeneralRe: ? Re: ? Re: How can a DLL execute a function of the main app? ? ? Pin
John R. Shaw28-Nov-04 11:35
John R. Shaw28-Nov-04 11:35 
GeneralRe: ? Re: ? Re: How can a DLL execute a function of the main app? ? ? Pin
Neville Franks28-Nov-04 11:17
Neville Franks28-Nov-04 11:17 
AnswerRe: How can a DLL execute a function of the main app? Pin
Nick Nougat29-Nov-04 5:52
Nick Nougat29-Nov-04 5:52 
GeneralAvoid compile entire proyect Pin
Juan Ignacio Garzón27-Nov-04 5:14
Juan Ignacio Garzón27-Nov-04 5:14 
GeneralRe: Avoid compile entire proyect Pin
John R. Shaw27-Nov-04 5:55
John R. Shaw27-Nov-04 5:55 
GeneralRe: Avoid compile entire proyect Pin
Michael Dunn27-Nov-04 8:26
sitebuilderMichael Dunn27-Nov-04 8:26 
GeneralRe: Avoid compile entire proyect Pin
Juan Ignacio Garzón27-Nov-04 8:54
Juan Ignacio Garzón27-Nov-04 8:54 
GeneralReturning an array from a function Pin
aaadetos27-Nov-04 2:21
aaadetos27-Nov-04 2:21 
GeneralRe: Returning an array from a function Pin
Kevin McFarlane27-Nov-04 2:31
Kevin McFarlane27-Nov-04 2:31 
GeneralRe: Returning an array from a function Pin
aaadetos27-Nov-04 2:35
aaadetos27-Nov-04 2:35 
GeneralRe: Returning an array from a function Pin
Kevin McFarlane27-Nov-04 4:11
Kevin McFarlane27-Nov-04 4:11 
GeneralRe: Returning an array from a function Pin
John R. Shaw27-Nov-04 6:12
John R. Shaw27-Nov-04 6:12 
GeneralRe: Returning an array from a function Pin
aaadetos30-Nov-04 2:08
aaadetos30-Nov-04 2:08 
GeneralRe: Returning an array from a function Pin
John R. Shaw30-Nov-04 14:40
John R. Shaw30-Nov-04 14:40 

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.