Click here to Skip to main content
15,886,644 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Permutations of a Binary String Pin
Ryan Binns13-Feb-06 17:27
Ryan Binns13-Feb-06 17:27 
AnswerRe: Permutations of a Binary String Pin
Stephen Hewitt13-Feb-06 17:33
Stephen Hewitt13-Feb-06 17:33 
AnswerRe: Permutations of a Binary String Pin
Joshua Quick13-Feb-06 17:36
Joshua Quick13-Feb-06 17:36 
QuestionAssembly function to make a beep with PC speaker? Pin
Lord Kixdemp13-Feb-06 16:59
Lord Kixdemp13-Feb-06 16:59 
AnswerRe: Assembly function to make a beep with PC speaker? Pin
Ryan Binns13-Feb-06 17:09
Ryan Binns13-Feb-06 17:09 
Questionicon drew on the SDI view is of a square black backgroud Pin
zhonglin.liang13-Feb-06 16:20
zhonglin.liang13-Feb-06 16:20 
QuestionEmulator - I'm stuck (newbie) Pin
fear_the_weasel13-Feb-06 14:16
fear_the_weasel13-Feb-06 14:16 
AnswerRe: Emulator - I'm stuck (newbie) Pin
Stephen Hewitt13-Feb-06 15:43
Stephen Hewitt13-Feb-06 15:43 
Probably the easiest way would be to pass function pointers to the DLL which it would use to callback into the .EXE. Here's the basic idea:

// In the header file of the DLL. Included by both DLL and EXE.<br />
typedef void (*PMainFunc)() PMain;<br />
extern "C" void SetCallback(PMainFunc pCallback);<br />
 <br />
// In the exe.<br />
void InMainCalledFromDll()<br />
{<br />
     // Blah....<br />
}<br />
 <br />
int main(int argc, char* argv[])<br />
{<br />
     SetCallback(&InMainCalledFromDll);<br />
}


There are many variation of this theme, for example passing the address of a structure of function pointers or using virtual functions. This should get you started.


Steve
AnswerRe: Emulator - I'm stuck (newbie) Pin
Michael Dunn13-Feb-06 15:45
sitebuilderMichael Dunn13-Feb-06 15:45 
GeneralRe: Emulator - I'm stuck (newbie) Pin
fear_the_weasel13-Feb-06 15:53
fear_the_weasel13-Feb-06 15:53 
QuestionWhite Space Pin
cuteee13-Feb-06 13:00
cuteee13-Feb-06 13:00 
AnswerRe: White Space Pin
George L. Jackson13-Feb-06 13:20
George L. Jackson13-Feb-06 13:20 
GeneralRe: White Space Pin
cuteee13-Feb-06 13:50
cuteee13-Feb-06 13:50 
QuestionMacros with a variable parameter list? Pin
PJ Arends13-Feb-06 12:56
professionalPJ Arends13-Feb-06 12:56 
AnswerRe: Macros with a variable parameter list? Pin
Ryan Binns13-Feb-06 13:21
Ryan Binns13-Feb-06 13:21 
AnswerRe: Macros with a variable parameter list? Pin
Michael Dunn13-Feb-06 15:49
sitebuilderMichael Dunn13-Feb-06 15:49 
Questioncolorful text in Edit? Pin
LeeeNN13-Feb-06 11:34
LeeeNN13-Feb-06 11:34 
AnswerRe: colorful text in Edit? Pin
RChin13-Feb-06 12:22
RChin13-Feb-06 12:22 
AnswerRe: colorful text in Edit? Pin
ThatsAlok14-Feb-06 21:39
ThatsAlok14-Feb-06 21:39 
QuestionRS232 Newbie Pin
Jader8913-Feb-06 11:31
Jader8913-Feb-06 11:31 
AnswerRe: RS232 Newbie Pin
Cool Ju13-Feb-06 17:49
Cool Ju13-Feb-06 17:49 
GeneralRe: RS232 Newbie Pin
Jader8914-Feb-06 13:26
Jader8914-Feb-06 13:26 
QuestionValid File Name Pin
Jack Puppy13-Feb-06 11:18
Jack Puppy13-Feb-06 11:18 
AnswerRe: Valid File Name Pin
Stephen Hewitt13-Feb-06 19:05
Stephen Hewitt13-Feb-06 19:05 
GeneralRe: Valid File Name Pin
Jack Puppy14-Feb-06 3:59
Jack Puppy14-Feb-06 3: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.