Re: Euphoria and Windows XP SP2

new topic     » goto parent     » topic index » view thread      » older message » newer message

>From: Pete Lomax <petelomax at blueyonder.co.uk>
>Reply-To: EUforum at topica.com
>To: EUforum at topica.com
>Subject: Re: Euphoria and Windows XP SP2
>Date: Sat, 18 Sep 2004 17:53:21 +0100
>
>On Sat, 18 Sep 2004 06:43:15 -0700, Tommy Carlier
><guest at RapidEuphoria.com> wrote:
>
> >Like suggested in
> >previous posts, the manually constructed assembly-routines
> >cause problems. But there were also problems with c_func
>I suspect the call_back function (line 199) is essentially the same.
>Platform.htm states "each call-back address that you create requires a
>small block of memory." At a guess that will be allocated on the heap
>(so will be a data segment not a code segment) and will contain
>machine code, not data (so it can be called).
>
>Is there anything in DEP which permits a program to deliberately
>change a data segment into a code segment, or is that fixed on initial
>program load?
>

     When you call VirtualAlloc (not malloc or HeapAlloc), you should set=
=20
the PAGE_EXECUTE, PAGE_EXECUTE_READ, PAGE_EXECUTE_READWRITE, or
PAGE_EXECUTE_WRITECOPY flags to indicate that the allocated page be
executable. To be nice (you just know MS will make DEP on by default in the=
=20
next version in "the user's best interests"), Eu should do that for
call_backs (and c_func, too, though I suspect the problem with
CreateWindowEx was really just Windows trying to call the WindowProc.) Also=
,=20
certain code would need some way of fixing itself (ie fptr.e). You can't=
=20
just turn on execute privileges for everything returned by allocate() of=
=20
course, because that would just defeat the purpose of DEP.

>Pete
>

~[ WingZone ]~
http://wingzone.tripod.com/

s=20
to offer.=20
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=10=
34&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines=20
  Start enjoying all the benefits of MSN=AE Premium right now and get the=
=20
first two months FREE*.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu