On Sun, Jan 16, 2022 at 10:18 AM Nikolay Sivov <nsi...@codeweavers.com> wrote: > > > > On 1/16/22 10:06, Vincent Torri wrote: > > hello > > > > On Sat, Jan 15, 2022 at 9:28 AM Vincent Torri <vincent.to...@gmail.com> > > wrote: > >> On Sat, Jan 15, 2022 at 7:43 AM Nikolay Sivov <nsi...@codeweavers.com> > >> wrote: > >>> > >>> > >>> On 1/14/22 23:05, Vincent Torri wrote: > >>>> On Fri, Jan 14, 2022 at 6:31 PM Nikolay Sivov <nsi...@codeweavers.com> > >>>> wrote: > >>>>>> on the contrary, CreateBitmap(), DrawBitmap(), BeginDraw(), EndDraw() > >>>>>> or SetTransform() are working with the C API. > >>>>>> > >>>>>> Does someone have an idea of the problem. I have a test program if you > >>>>>> want > >>>>> It's a known thing, C-compatible prototypes would be different for such > >>>>> methods: > >>>>> > >>>>> D2D1_SIZE_U * ID3D1HwndRenderTarget_GetPixelSize(void *this, D2D1_SIZE_U > >>>>> *size). > >>>> but then I have a compilation error because in d2d1.h provided by > >>>> mingw-w64, GetPixelSize() has only 1 argument, not 2. > >>> Naturally, because headers are not prepared for that. > >>> > >>> If you wanted to use C++ with msvc compatible prototypes, there is > >>> WIDL_EXPLICIT_AGGREGATE_RETURNS for that, > >>> for C definitions it won't work, you'll have to use wine headers, or > >>> more specifically a header widl produces from wine's d2d1.idl. Widl > >>> detects such cases automatically, see is_aggregate_return() in widl > >>> sources. > >>> > >>> I think what should be done is WIDL_EXPLICIT_AGGREGATE_RETURNS case for > >>> C definitions patched in for mingw headers. > > i've installed wine in archlinux, and > > ID3D1HwndRenderTarget_GetPixelSize is defined with another macro, i > > guess, which i don't know the value (no lucj with an fgrep -r in > > /usr/include/wine > > > > so i don't know the declaration of the function with d2d1.h provided with > > wine > > Please take a closer look, there is a function wrapper called > ID2D1HwndRenderTarget_GetPixelSize().
yes, and it has 1 argument, the render target (in the archlinux installed wine) > Also see attached patch, maybe that's enough to make it work for now. I'll try it, thank you Vincent Torri _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public