[1/2] kernel32: Add a test for VirtualProtect.

Alexandre Julliard julliard at winehq.org
Mon Sep 26 11:16:56 CDT 2011


Dmitry Timoshkov <dmitry at baikal.ru> writes:

> +static void test_VirtualProtect(void)
> +{
> +    static const struct test_data
> +    {
> +        DWORD prot_set, prot_get;
> +    } td[] =
> +    {
> +        { PAGE_NOACCESS, PAGE_NOACCESS },
> +        { PAGE_READONLY, PAGE_READONLY },
> +        { PAGE_READWRITE, PAGE_READWRITE },
> +        { PAGE_WRITECOPY, 0 },
> +        { PAGE_EXECUTE, PAGE_EXECUTE },
> +        { PAGE_EXECUTE_READ, PAGE_EXECUTE_READ },
> +        { PAGE_EXECUTE_READWRITE, PAGE_EXECUTE_READWRITE },
> +        { PAGE_EXECUTE_WRITECOPY, 0 }

You should also test various invalid combinations.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list