Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: what are the includes for WM_KICKIDLE ??? Pin
Carlos Antollini2-Jan-02 9:43
Carlos Antollini2-Jan-02 9:43 
GeneralRe: what are the includes for WM_KICKIDLE ??? Pin
Nish Nishant2-Jan-02 16:37
sitebuilderNish Nishant2-Jan-02 16:37 
AnswerRe: what are the includes for WM_KICKIDLE ??? Pin
Philip Patrick2-Jan-02 13:07
professionalPhilip Patrick2-Jan-02 13:07 
GeneralDynamically Creating code and executing it Pin
slacker2-Jan-02 7:12
slacker2-Jan-02 7:12 
GeneralRe: Dynamically Creating code and executing it Pin
Rickard Andersson202-Jan-02 7:18
Rickard Andersson202-Jan-02 7:18 
GeneralRe: Dynamically Creating code and executing it Pin
Ravi Bhavnani2-Jan-02 7:21
professionalRavi Bhavnani2-Jan-02 7:21 
GeneralRe: Dynamically Creating code and executing it Pin
Brian V Shifrin2-Jan-02 8:21
Brian V Shifrin2-Jan-02 8:21 
GeneralRe: Dynamically Creating code and executing it Pin
Rick York2-Jan-02 8:50
mveRick York2-Jan-02 8:50 
It can be done but it is a HUGE amount of work and, in most cases, not worth the effort. I implemented an on-the-fly machine code generator for the script engine in my company's product and it was not an easy task at all. This is similar to what JIT compilers for Java do. I actually know very little about assembly code. I just stared at a whole bunch of .cod files emitted by VC++ and sorted out how it works. Curiously, I found that VC++ only uses three data registers to do everything. Another curiosity is that the this pointer for C++ methods is not passed on the stack. It is loaded into ECX prior to the call.

Anyway, What it amounts to is you build a block of bytes of data that are machine code and set a pointer to a function to the address of the block and (*execute_it).

I think an interpreted language is probably the easiest way to go about this and there are many of them.

GeneralRe: Dynamically Creating code and executing it Pin
2-Jan-02 9:28
suss2-Jan-02 9:28 
GeneralRe: Dynamically Creating code and executing it Pin
Rick York2-Jan-02 11:31
mveRick York2-Jan-02 11:31 
GeneralRe: Dynamically Creating code and executing it Pin
Carlos Antollini2-Jan-02 9:20
Carlos Antollini2-Jan-02 9:20 
GeneralRe: Dynamically Creating code and executing it Pin
Roger Wright (new)2-Jan-02 16:33
Roger Wright (new)2-Jan-02 16:33 
GeneralRe: Dynamically Creating code and executing it Pin
Todd Smith2-Jan-02 18:02
Todd Smith2-Jan-02 18:02 
GeneralCImageList & Replace with bitmap mask Pin
2-Jan-02 6:07
suss2-Jan-02 6:07 
GeneralRe: CImageList & Replace with bitmap mask Pin
Ernest Laurentin2-Jan-02 7:08
Ernest Laurentin2-Jan-02 7:08 
GeneralRe: CImageList & Replace with bitmap mask Pin
2-Jan-02 8:00
suss2-Jan-02 8:00 
GeneralRe: CImageList & Replace with bitmap mask Pin
Ernest Laurentin2-Jan-02 11:26
Ernest Laurentin2-Jan-02 11:26 
GeneralRe: CImageList & Replace with bitmap mask Pin
3-Jan-02 1:39
suss3-Jan-02 1:39 
GeneralRe: CImageList & Replace with bitmap mask Pin
Ernest Laurentin3-Jan-02 5:16
Ernest Laurentin3-Jan-02 5:16 
GeneralSkinStyle (no MFC) error: undefined reference to... Pin
Kuniva2-Jan-02 5:18
Kuniva2-Jan-02 5:18 
Generaldraw lines in a CRichEditCtrl Pin
jafrazee2-Jan-02 5:11
jafrazee2-Jan-02 5:11 
GeneralMoving and Resizing Tool Tip (CToolTipCtrl) Pin
GurGur2-Jan-02 4:30
GurGur2-Jan-02 4:30 
GeneralMultiple documents dialog box Pin
FredrikB2-Jan-02 4:09
FredrikB2-Jan-02 4:09 
GeneralVis Studio won't start add-ins Pin
2-Jan-02 3:45
suss2-Jan-02 3:45 
GeneralRe: Vis Studio won't start add-ins Pin
Lim Bio Liong2-Jan-02 17:05
Lim Bio Liong2-Jan-02 17:05 

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.