From 73dc42c36cfd8e12a3e36f6c4d1ce9a815127f1d Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 6 Aug 2022 03:45:34 +0200 Subject: [PATCH] Workaround for field marshalling on UWP See https://github.com/dotnet/runtime/issues/37295 --- .../um/d2d1effectauthor/D2D1_PROPERTY_BINDING.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/D2D1_PROPERTY_BINDING.cs b/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/D2D1_PROPERTY_BINDING.cs index 260517aa..723ffcf9 100644 --- a/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/D2D1_PROPERTY_BINDING.cs +++ b/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/D2D1_PROPERTY_BINDING.cs @@ -5,7 +5,9 @@ #pragma warning disable CS0649 +#if NET6_0_OR_GREATER using TerraFX.Interop.Windows; +#endif namespace TerraFX.Interop.DirectX { @@ -15,9 +17,17 @@ namespace TerraFX.Interop.DirectX public ushort* propertyName; [NativeTypeName("PD2D1_PROPERTY_SET_FUNCTION")] +#if NET6_0_OR_GREATER public delegate* unmanaged[Stdcall] setFunction; +#else + public void* setFunction; +#endif [NativeTypeName("PD2D1_PROPERTY_GET_FUNCTION")] +#if NET6_0_OR_GREATER public delegate* unmanaged[Stdcall] getFunction; +#else + public void* getFunction; +#endif } } \ No newline at end of file