Re: New version of my test for bug 4543

2009-11-20 Thread Paul Vriens

On 11/20/2009 04:25 PM, Charles Davis wrote:

Paul Vriens wrote:

On 11/19/2009 11:17 PM, Charles Davis wrote:

Hi,

This is a new version of my test for bug 4543. This time, I followed
Dmitry's suggestion of using the existing functions for comparing the
contents of EMFs. I can't build tests for Windows both due to bug 20763
and due to the fact that I don't have any Windows boxes, so once again I
need people to run this test on Windows to make sure it's an accurate
representation of Windows' behavior. The test currently succeeds on Wine.

Thanks in advance.

Chip



Hi,

I only ran your new tests and removed that "if(0)", please find the
results attached.

Win95/98/me have the same results (as expected) and have several
failures (as expected). Fixing them would be a bonus but we currently
are having several metafile failures for these platforms anyway.


Thanks, Paul!

Based on these results, I modified my test (and Wine to pass), using the
WinXP results as the expected bits. I've submitted the patches to
wine-patches, so now we'll see what Alexandre thinks.

The Win9x failures mystify me. Why would CreateEnhMetaFileA() fail? I
need to look into this.


The last error is set to ERROR_FILE_NOT_FOUND.



Chip




--
Cheers,

Paul.




Re: New version of my test for bug 4543

2009-11-20 Thread Charles Davis
Paul Vriens wrote:
> On 11/19/2009 11:17 PM, Charles Davis wrote:
>> Hi,
>>
>> This is a new version of my test for bug 4543. This time, I followed
>> Dmitry's suggestion of using the existing functions for comparing the
>> contents of EMFs. I can't build tests for Windows both due to bug 20763
>> and due to the fact that I don't have any Windows boxes, so once again I
>> need people to run this test on Windows to make sure it's an accurate
>> representation of Windows' behavior. The test currently succeeds on Wine.
>>
>> Thanks in advance.
>>
>> Chip
>>
> 
> Hi,
> 
> I only ran your new tests and removed that "if(0)", please find the
> results attached.
> 
> Win95/98/me have the same results (as expected) and have several
> failures (as expected). Fixing them would be a bonus but we currently
> are having several metafile failures for these platforms anyway.
> 
Thanks, Paul!

Based on these results, I modified my test (and Wine to pass), using the
WinXP results as the expected bits. I've submitted the patches to
wine-patches, so now we'll see what Alexandre thinks.

The Win9x failures mystify me. Why would CreateEnhMetaFileA() fail? I
need to look into this.

Chip





Re: New version of my test for bug 4543

2009-11-20 Thread Paul Vriens

On 11/19/2009 11:17 PM, Charles Davis wrote:

Hi,

This is a new version of my test for bug 4543. This time, I followed
Dmitry's suggestion of using the existing functions for comparing the
contents of EMFs. I can't build tests for Windows both due to bug 20763
and due to the fact that I don't have any Windows boxes, so once again I
need people to run this test on Windows to make sure it's an accurate
representation of Windows' behavior. The test currently succeeds on Wine.

Thanks in advance.

Chip



Hi,

I only ran your new tests and removed that "if(0)", please find the 
results attached.


Win95/98/me have the same results (as expected) and have several 
failures (as expected). Fixing them would be a bonus but we currently 
are having several metafile failures for these platforms anyway.


--
Cheers,

Paul.
EMF emf_BitBlt has bits:
{
0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x5b, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00,
0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
0x98, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x23, 0x04, 0x00, 0x00, 0x3b, 0x02, 0x00, 0x00,
0x40, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x64, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x8c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x4c, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x62, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
};
EMF emf_BitBlt has records:
emr->iType 1, emr->nSize 100
emr->iType 76, emr->nSize 188
emr->iType 76, emr->nSize 100
emr->iType 14, emr->nSize 20
metafile: 9 tests executed (0 marked as todo, 0 failures), 0 skipped.
EMF emf_BitBlt has bits:
{
0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x6a, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00,
0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
0xa0, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x23, 0x04, 0x00, 0x00, 0x3b, 0x02, 0x00, 0x00,
0x76, 0x01, 0x00, 0x00, 0xc9, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x57, 0xb3, 0x05, 0x00,
0xdc, 0x12, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
  

Re: New version of my test for bug 4543

2009-11-19 Thread Charles Davis
Paul Vriens wrote:
> On 11/19/2009 11:17 PM, Charles Davis wrote:
>> Hi,
>>
>> This is a new version of my test for bug 4543. This time, I followed
>> Dmitry's suggestion of using the existing functions for comparing the
>> contents of EMFs. I can't build tests for Windows both due to bug 20763
>> and due to the fact that I don't have any Windows boxes, so once again I
>> need people to run this test on Windows to make sure it's an accurate
>> representation of Windows' behavior. The test currently succeeds on Wine.
>>
>> Thanks in advance.
>>
>> Chip
>>
>>
>>
>>
> I'll give it a try on some of my (VMware) boxes tomorrow.
> 
Thanks.

I almost forgot: some of the test is if(0)'d out because it crashes on
Wine (right now). So, you may wish to un-if(0) the crashing test when
you run on Windows. I'm particularly interested in the EMF that the test
produces on Windows (it should dump it to the console if you run with
WINETEST_DEBUG=1), so that would be really helpful.

Chip






Re: New version of my test for bug 4543

2009-11-19 Thread Charles Davis
Ricardo Filipe wrote:
> 2009/11/19 Charles Davis :
>> Hi,
>>
>> This is a new version of my test for bug 4543. This time, I followed
>> Dmitry's suggestion of using the existing functions for comparing the
>> contents of EMFs. I can't build tests for Windows both due to bug 20763
>> and due to the fact that I don't have any Windows boxes, so once again I
>> need people to run this test on Windows to make sure it's an accurate
>> representation of Windows' behavior. The test currently succeeds on Wine.
>>
>> Thanks in advance.
>>
>> Chip
>>
>> From 574bb4f7b2b90a209b1693b7f8048a2eb271ada8 Mon Sep 17 00:00:00 2001
>> From: Charles Davis 
>> Date: Tue, 17 Nov 2009 11:10:50 -0700
>> Subject: [PATCH] gdi32/tests: Test BitBlt() to an enhanced metafile.
>> To: wine-patches 
>> Reply-To: wine-devel 
>>
>> ---
>>  dlls/gdi32/tests/metafile.c |  125 
>> +++
>>  1 files changed, 125 insertions(+), 0 deletions(-)
>>
>> diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
>> index b559901..3bd413b 100644
>> --- a/dlls/gdi32/tests/metafile.c
>> +++ b/dlls/gdi32/tests/metafile.c
>> @@ -1030,6 +1030,63 @@ static const unsigned char EMF_LINETO_MM_TEXT_BITS[] 
>> = {
>> 0x14, 0x00, 0x00, 0x00
>>  };
>>
>> +static const unsigned char EMF_BITBLT[] =
>> +{
>> +0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x94, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00,
>> +0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
>> +0xa0, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
>> +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
>> +0xfc, 0x01, 0x00, 0x00, 0x38, 0x01, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
>> +0xc0, 0xc2, 0x04, 0x00, 0x4c, 0x00, 0x00, 0x00,
>> +0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
>> +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
>> +0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x64, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
>> +0x8c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
>> +0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
>> +0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
>> +0xc4, 0x0e, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x4c, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
>> +0x62, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
>> +0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
>> +0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> +0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
>> +};
>> +
>> +
>>  /* For debugging or dumping the raw metafiles produced by
>>  * new test functions.
>>  */
>> @@ -1382,6 +1439,73 @@ static int compare_emf_bits(const HENHMETAFILE mf, 
>> const unsigned char *bits,
>> return 0;
>>  }
>>
>> +
>> +/* tests blitting to an EMF */
>> +static void test_emf_BitBlt(void)
>> +{
>> +HDC hdcDisplay, hdcMetafile, hdcBitmap;
>> +HBITMAP hBitmap, hOldBitmap;
>> +HENHMETAFILE hMetafile;
>> +#define BMP_DIM 4
>> +BITMAPINFOHEADER bmih =
>> +{
>> +sizeof(BITMAPINFOHEADER),
>> +BMP_DIM,/* biWidth */
>> +BMP_DIM,/* biHeight */
>> +1,  /* biPlanes */
>> +24, /* biBitCount */
>> +BI_RGB, /* biCompression */
>> +0,  /* biXPelsPerMeter *

Re: New version of my test for bug 4543

2009-11-19 Thread Ricardo Filipe
2009/11/19 Charles Davis :
> Hi,
>
> This is a new version of my test for bug 4543. This time, I followed
> Dmitry's suggestion of using the existing functions for comparing the
> contents of EMFs. I can't build tests for Windows both due to bug 20763
> and due to the fact that I don't have any Windows boxes, so once again I
> need people to run this test on Windows to make sure it's an accurate
> representation of Windows' behavior. The test currently succeeds on Wine.
>
> Thanks in advance.
>
> Chip
>
> From 574bb4f7b2b90a209b1693b7f8048a2eb271ada8 Mon Sep 17 00:00:00 2001
> From: Charles Davis 
> Date: Tue, 17 Nov 2009 11:10:50 -0700
> Subject: [PATCH] gdi32/tests: Test BitBlt() to an enhanced metafile.
> To: wine-patches 
> Reply-To: wine-devel 
>
> ---
>  dlls/gdi32/tests/metafile.c |  125 
> +++
>  1 files changed, 125 insertions(+), 0 deletions(-)
>
> diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
> index b559901..3bd413b 100644
> --- a/dlls/gdi32/tests/metafile.c
> +++ b/dlls/gdi32/tests/metafile.c
> @@ -1030,6 +1030,63 @@ static const unsigned char EMF_LINETO_MM_TEXT_BITS[] = 
> {
>     0x14, 0x00, 0x00, 0x00
>  };
>
> +static const unsigned char EMF_BITBLT[] =
> +{
> +    0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x94, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00,
> +    0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
> +    0xa0, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
> +    0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
> +    0xfc, 0x01, 0x00, 0x00, 0x38, 0x01, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
> +    0xc0, 0xc2, 0x04, 0x00, 0x4c, 0x00, 0x00, 0x00,
> +    0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
> +    0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
> +    0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x64, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
> +    0x8c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
> +    0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
> +    0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
> +    0xc4, 0x0e, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x4c, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
> +    0x62, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
> +    0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
> +    0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +    0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
> +};
> +
> +
>  /* For debugging or dumping the raw metafiles produced by
>  * new test functions.
>  */
> @@ -1382,6 +1439,73 @@ static int compare_emf_bits(const HENHMETAFILE mf, 
> const unsigned char *bits,
>     return 0;
>  }
>
> +
> +/* tests blitting to an EMF */
> +static void test_emf_BitBlt(void)
> +{
> +    HDC hdcDisplay, hdcMetafile, hdcBitmap;
> +    HBITMAP hBitmap, hOldBitmap;
> +    HENHMETAFILE hMetafile;
> +#define BMP_DIM 4
> +    BITMAPINFOHEADER bmih =
> +    {
> +        sizeof(BITMAPINFOHEADER),
> +        BMP_DIM,/* biWidth */
> +        BMP_DIM,/* biHeight */
> +        1,      /* biPlanes */
> +        24,     /* biBitCount */
> +        BI_RGB, /* biCompression */
> +        0,      /* biXPelsPerMeter */
> +        0,      /* biYPelsPerMeter */
> +        0,      /* biClrUsed */
> +        0,      /* biClrImportant */
> +    };
> +    void