On 1/14/22 20:16, Vincent Torri wrote:
Hello

first, I'm on Win10

After initializing Direct2D, when I call

ID2D1HwndRenderTarget_GetPixelSize

  with a HwndRenderTarget, i get a seg fault.

But when I use the C++ API, no problem.

there is the same behavior with GetPixelFormat()

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).

You could check hows it's done in Wine, where we don't use C++.


thank you

Vincent Torri


_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to