Mail Archives: djgpp/2000/08/16/16:00:20
Użytkownik Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> w wiadomo¶ci do grup
dyskusyjnych napisał:2950-Wed16Aug2000151610+0300-eliz AT is DOT elta DOT co DOT il...
> > From: "Rafal Maj" <r_maj AT poczta DOT onet DOT pl>
> > Newsgroups: comp.os.msdos.djgpp
> > Date: Wed, 16 Aug 2000 10:44:44 +0200
> >
> > long int size = ((long int)(void*)fun_end) - ((long int)(void*)fun);
> > char *ptr = new char[size];
> > memcpy(ptr,(void*)fun,size);
> >
> > void (*function_ptr)() = (void (*)()) ptr;
> >
> > (*function_ptr)(); // <------ CALL of function copy
>
> This is not supposed to work.
(...)
>
> Why would you want to do anything crazy like that, anyway?
>
I wanted to use small plug-ins, but now I think I should use DXE instead.
Can someone send me a little example of DXE program, C++ program using DXE,
and
instruction how to compile/build it under RHIDE ?
__PLEASE__ can You write few lines of example, not just tell me to read
DOCs...
What are restrictions of DXE program ?
> Copy the code from Allegro more faithfully, and it will work for you
> as well.
I cann't beacause this part of Allegro is written in assembler and it is
very hard for me to use it in my program.
Allegro doesn't exacly call copy of function code stored in memory, but it
calls it's own, real-time-compiled code, that is written in assembler.
But it doesn't real matters, I will use DXE...
Rafal
- Raw text -