VirtualProtect() fixup

Alexandre Julliard julliard at
Fri Jun 8 15:24:34 CDT 2001

520053692817-0001 at (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.

> 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.

> Maybe we should add a winver check, though.

No thanks.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list