VirtualProtect() fixup
Andreas Mohr
520053692817-0001 at t-online.de
Fri Jun 8 15:36:35 CDT 2001
On Fri, Jun 08, 2001 at 01:24:34PM -0700, Alexandre Julliard wrote:
> 520053692817-0001 at t-online.de (Andreas Mohr) writes:
>
> > What isn't the case ? Both fixups ? Or only one of these ?
>
> The return value: NT returns a BOOL, 0 or 1.
>
> I haven't checked the old protection behavior; but anyway this doesn't
> belong in VirtualProtect, if we have to ignore the execute permission
> it must be done consistently throughout the code.
ok.
> > Well, to be exact, no application.
> > I just found this out by accident.
>
> That's what I suspected ;-)
:)
> > IMHO the probability that some applications exist that are too lazy
> > to supply their own old_prot variable and that check the return value instead
> > is rather high, so I think that patch is necessary.
>
> We can't start breaking things based only on your suspicion that
> someone somewhere will have used a feature that isn't documented at
> all (plus there is a documented way of doing exactly the same
> thing). If you have an app that needs it sure, otherwise we'll just
> keep returning a BOOL, as the function is documented to do.
Hmm, ok ;-\
(you do know that I disagree on these things, right ? after all Wine emulates
*Windows*, and if Windows does it that way, then we should do it, too, for
heaven's sake, especially if it's not really painful)
Anyway, but then please at least commit a comment for VirtualProtect
that says something like:
Note that the return value at least on W98SE is the value returned in old_prot
instead of a BOOL. We don't do this, as NT4 only returns a simple BOOL
as documented, but if a program needs this behaviour, then we should change it.
--
Andreas Mohr Stauferstr. 6, D-71272 Renningen, Germany
Tel. +49 7159 800604 http://home.germany.net/100-30936/
More information about the wine-devel
mailing list