Why can't we handle this the way that d2d1.idl does? It doesn't include wincodec.idl, but it declares the interfaces it uses from there.
I know the Windows SDK doesn't do that, but that's probably because the SDK headers are weird and don't declare the d2d1 interfaces in an idl.
From: wine-devel wine-devel-bounces@winehq.org on behalf of Vincent Povirk madewokherd@gmail.com Sent: Friday, 16 June 2017 2:49 AM To: wine-devel@winehq.org Subject: Re: [v2 PATCH] include/wincodec.idl: Stop redefinition of ID2D1Image
Why can't we handle this the way that d2d1.idl does? It doesn't include wincodec.idl, but it declares the interfaces it uses from there.
We cannot use "interface ID2D1Image;" like in d2d1.idl. This is just a forward declare and causes compile errors when building d3dx* with ../../include/wincodec.h:5800:9: error: unknown type name ‘ID2D1Image’ ID2D1Image *image
I only see two options, 1. Use the d2d1.idl, which will include extra interfaces not in the original or 2. Add the following to the wincodec.idl.
#ifndef __ID2D1Image_FWD_DEFINED__ #define __ID2D1Image_FWD_DEFINED__ typedef interface ID2D1Image ID2D1Image; #ifdef __cplusplus interface ID2D1Image; #endif /* __cplusplus */ #endif
I've sent v3 using the second approach above.
Best Regards Alistair Leslie-Hughes
On 16 June 2017 at 11:34, Alistair Leslie-Hughes leslie_alistair@hotmail.com wrote:
We cannot use "interface ID2D1Image;" like in d2d1.idl. This is just a forward declare and causes compile errors when building d3dx* with ../../include/wincodec.h:5800:9: error: unknown type name ‘ID2D1Image’ ID2D1Image *image
Uhm, no?
I only see two options,
- Use the d2d1.idl, which will include extra interfaces not in the original
or 2. Add the following to the wincodec.idl.
#ifndef __ID2D1Image_FWD_DEFINED__ #define __ID2D1Image_FWD_DEFINED__ typedef interface ID2D1Image ID2D1Image; #ifdef __cplusplus interface ID2D1Image; #endif /* __cplusplus */ #endif
That's pretty much what "interface ID2D1Image;" does, without the cpp_quote hackery.