[PATCH v3 2/2] kernel32/tests: resource: Replicate muirct.exe behavior

Alexandre Julliard julliard at winehq.org
Thu Jul 12 10:30:55 CDT 2018


Jon Doron <arilou at gmail.com> writes:

> +static void test_resource_internal_structure_offsets(void)
> +{
> +    HANDLE res;
> +    void *res_data;
> +    WCHAR *res_filenameW;
> +
> +    res = BeginUpdateResourceW( (PWCHAR)filenameW, FALSE );
> +    ok( res != NULL, "BeginUpdateResourceW failed\n" );
> +    res_data = GlobalLock(res);
> +    ok( res_data != NULL, "GlobalLock failed\n" );
> +#ifdef _WIN64
> +    res_filenameW = (PWCHAR)GlobalLock( *(HGLOBAL*)((ULONG_PTR)res_data + 0x30) );
> +#else
> +    res_filenameW = (PWCHAR)GlobalLock( *(HGLOBAL*)((ULONG_PTR)res_data + 0x18) );
> +#endif

You should define a structure similar to the one in the implementation.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list