diff --git a/src/Generator/Program.cs b/src/Generator/Program.cs index 3736883..ba9e1ce 100644 --- a/src/Generator/Program.cs +++ b/src/Generator/Program.cs @@ -1985,8 +1985,9 @@ public static class Program if (returnType != "void" && method.ReturnType.TargetKind != "Com" && method.ReturnType.Kind == "ApiRef" && - !IsPrimitive(method.ReturnType) && - !IsEnum(method.ReturnType)) + !IsEnum(method.ReturnType) && + IsStructAsReturnMarshal(method.ReturnType) + ) { useReturnAsParameter = true; } @@ -2699,6 +2700,59 @@ public static class Program return IsPrimitive(typeName); } + private static bool IsStructAsReturnMarshal(ApiDataType dataType) + { + if (dataType.Kind != "ApiRef") + { + throw new InvalidOperationException(); + } + + string apiRefType = GetTypeName($"{dataType.Api}.{dataType.Name}"); + if (apiRefType.EndsWith("*")) + { + apiRefType = apiRefType.Substring(0, apiRefType.Length - 1); + } + + switch (apiRefType) + { + case "void": + case "bool": + case "byte": + case "sbyte": + case "int": + case "uint": + case "short": + case "ushort": + case "long": + case "ulong": + case "float": + case "double": + return false; + + case "nint": + case "nuint": + case "IntPtr": + case "UIntPtr": + case "Guid": + return false; + + case "Bool32": + case "HResult": + return false; + + case "LargeInteger": + case "ULargeInteger": + return true; + + case "Luid": + return true; + + default: + return true; + } + } + + private static bool IsEnum(ApiDataType dataType) { if (dataType.Kind == "ApiRef") diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1Bitmap.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1Bitmap.cs index 7a8d804..da3d109 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1Bitmap.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1Bitmap.cs @@ -88,7 +88,8 @@ public unsafe partial struct ID2D1Bitmap [VtblIndex(4)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), &result); } /// @@ -96,7 +97,8 @@ public unsafe partial struct ID2D1Bitmap [VtblIndex(5)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1Bitmap1.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1Bitmap1.cs index 2e9075a..d427de0 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1Bitmap1.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1Bitmap1.cs @@ -88,7 +88,8 @@ public unsafe partial struct ID2D1Bitmap1 [VtblIndex(4)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result); } /// @@ -96,7 +97,8 @@ public unsafe partial struct ID2D1Bitmap1 [VtblIndex(5)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1BitmapRenderTarget.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1BitmapRenderTarget.cs index 4c1b7ba..4289aa9 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1BitmapRenderTarget.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1BitmapRenderTarget.cs @@ -481,7 +481,8 @@ public unsafe partial struct ID2D1BitmapRenderTarget [VtblIndex(53)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), &result); } /// @@ -489,7 +490,8 @@ public unsafe partial struct ID2D1BitmapRenderTarget [VtblIndex(54)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DCRenderTarget.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DCRenderTarget.cs index 0fa492d..827c407 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DCRenderTarget.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DCRenderTarget.cs @@ -481,7 +481,8 @@ public unsafe partial struct ID2D1DCRenderTarget [VtblIndex(53)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), &result); } /// @@ -489,7 +490,8 @@ public unsafe partial struct ID2D1DCRenderTarget [VtblIndex(54)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext.cs index b423c9f..8f8d748 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext.cs @@ -481,7 +481,8 @@ public unsafe partial struct ID2D1DeviceContext [VtblIndex(53)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), &result); } /// @@ -489,7 +490,8 @@ public unsafe partial struct ID2D1DeviceContext [VtblIndex(54)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext1.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext1.cs index fada1b5..f3413a3 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext1.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext1.cs @@ -481,7 +481,8 @@ public unsafe partial struct ID2D1DeviceContext1 [VtblIndex(53)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), &result); } /// @@ -489,7 +490,8 @@ public unsafe partial struct ID2D1DeviceContext1 [VtblIndex(54)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext2.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext2.cs index 558bac9..0a9ef22 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext2.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext2.cs @@ -481,7 +481,8 @@ public unsafe partial struct ID2D1DeviceContext2 [VtblIndex(53)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), &result); } /// @@ -489,7 +490,8 @@ public unsafe partial struct ID2D1DeviceContext2 [VtblIndex(54)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext3.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext3.cs index c438766..3771f8d 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext3.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext3.cs @@ -481,7 +481,8 @@ public unsafe partial struct ID2D1DeviceContext3 [VtblIndex(53)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), &result); } /// @@ -489,7 +490,8 @@ public unsafe partial struct ID2D1DeviceContext3 [VtblIndex(54)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext4.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext4.cs index db76757..bc532da 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext4.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext4.cs @@ -481,7 +481,8 @@ public unsafe partial struct ID2D1DeviceContext4 [VtblIndex(53)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), &result); } /// @@ -489,7 +490,8 @@ public unsafe partial struct ID2D1DeviceContext4 [VtblIndex(54)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext5.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext5.cs index 3b9c90c..a8c9843 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext5.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext5.cs @@ -481,7 +481,8 @@ public unsafe partial struct ID2D1DeviceContext5 [VtblIndex(53)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), &result); } /// @@ -489,7 +490,8 @@ public unsafe partial struct ID2D1DeviceContext5 [VtblIndex(54)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext6.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext6.cs index 1a2c51c..3503ba4 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext6.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1DeviceContext6.cs @@ -481,7 +481,8 @@ public unsafe partial struct ID2D1DeviceContext6 [VtblIndex(53)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), &result); } /// @@ -489,7 +490,8 @@ public unsafe partial struct ID2D1DeviceContext6 [VtblIndex(54)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1HwndRenderTarget.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1HwndRenderTarget.cs index ddfca79..901dad2 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1HwndRenderTarget.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1HwndRenderTarget.cs @@ -481,7 +481,8 @@ public unsafe partial struct ID2D1HwndRenderTarget [VtblIndex(53)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), &result); } /// @@ -489,7 +490,8 @@ public unsafe partial struct ID2D1HwndRenderTarget [VtblIndex(54)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1Layer.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1Layer.cs index 44d33a9..e61017c 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1Layer.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1Layer.cs @@ -88,7 +88,8 @@ public unsafe partial struct ID2D1Layer [VtblIndex(4)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Layer*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1Layer*)Unsafe.AsPointer(ref this), &result); } } diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1LinearGradientBrush.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1LinearGradientBrush.cs index 8a40ffc..c51922a 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1LinearGradientBrush.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1LinearGradientBrush.cs @@ -136,7 +136,8 @@ public unsafe partial struct ID2D1LinearGradientBrush [VtblIndex(10)] public System.Drawing.PointF GetStartPoint() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this)); + System.Drawing.PointF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), &result); } /// @@ -144,7 +145,8 @@ public unsafe partial struct ID2D1LinearGradientBrush [VtblIndex(11)] public System.Drawing.PointF GetEndPoint() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this)); + System.Drawing.PointF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1OffsetTransform.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1OffsetTransform.cs index a86ca45..c2b13ae 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1OffsetTransform.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1OffsetTransform.cs @@ -96,7 +96,8 @@ public unsafe partial struct ID2D1OffsetTransform [VtblIndex(5)] public System.Drawing.Point GetOffset() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1OffsetTransform*)Unsafe.AsPointer(ref this)); + System.Drawing.Point result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1OffsetTransform*)Unsafe.AsPointer(ref this), &result); } } diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1RadialGradientBrush.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1RadialGradientBrush.cs index 7103fc8..c6968d6 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1RadialGradientBrush.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1RadialGradientBrush.cs @@ -152,7 +152,8 @@ public unsafe partial struct ID2D1RadialGradientBrush [VtblIndex(12)] public System.Drawing.PointF GetCenter() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this)); + System.Drawing.PointF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), &result); } /// @@ -160,7 +161,8 @@ public unsafe partial struct ID2D1RadialGradientBrush [VtblIndex(13)] public System.Drawing.PointF GetGradientOriginOffset() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this)); + System.Drawing.PointF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1RenderTarget.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1RenderTarget.cs index a51c777..007097d 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1RenderTarget.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1RenderTarget.cs @@ -481,7 +481,8 @@ public unsafe partial struct ID2D1RenderTarget [VtblIndex(53)] public System.Drawing.SizeF GetSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[53]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), &result); } /// @@ -489,7 +490,8 @@ public unsafe partial struct ID2D1RenderTarget [VtblIndex(54)] public System.Drawing.Size GetPixelSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this)); + System.Drawing.Size result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[54]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1SvgDocument.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1SvgDocument.cs index a56bf10..61e2e5f 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1SvgDocument.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D/ID2D1SvgDocument.cs @@ -96,7 +96,8 @@ public unsafe partial struct ID2D1SvgDocument [VtblIndex(5)] public System.Drawing.SizeF GetViewportSize() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1SvgDocument*)Unsafe.AsPointer(ref this)); + System.Drawing.SizeF result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1SvgDocument*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device.cs index ff1ca95..a52c962 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device.cs @@ -402,7 +402,8 @@ public unsafe partial struct ID3D12Device [VtblIndex(43)] public Luid GetAdapterLuid() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device*)Unsafe.AsPointer(ref this)); + Luid result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device*)Unsafe.AsPointer(ref this), &result); } } diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device1.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device1.cs index b0fad95..fda4c15 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device1.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device1.cs @@ -402,7 +402,8 @@ public unsafe partial struct ID3D12Device1 [VtblIndex(43)] public Luid GetAdapterLuid() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device1*)Unsafe.AsPointer(ref this)); + Luid result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device1*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device2.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device2.cs index 1bbbbc3..8723c10 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device2.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device2.cs @@ -402,7 +402,8 @@ public unsafe partial struct ID3D12Device2 [VtblIndex(43)] public Luid GetAdapterLuid() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device2*)Unsafe.AsPointer(ref this)); + Luid result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device2*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device3.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device3.cs index 3a8cedc..e2a5ab5 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device3.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device3.cs @@ -402,7 +402,8 @@ public unsafe partial struct ID3D12Device3 [VtblIndex(43)] public Luid GetAdapterLuid() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device3*)Unsafe.AsPointer(ref this)); + Luid result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device3*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device4.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device4.cs index 5e0755b..ef2976b 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device4.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device4.cs @@ -402,7 +402,8 @@ public unsafe partial struct ID3D12Device4 [VtblIndex(43)] public Luid GetAdapterLuid() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device4*)Unsafe.AsPointer(ref this)); + Luid result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device4*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device5.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device5.cs index 0c9645f..55fb364 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device5.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device5.cs @@ -402,7 +402,8 @@ public unsafe partial struct ID3D12Device5 [VtblIndex(43)] public Luid GetAdapterLuid() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device5*)Unsafe.AsPointer(ref this)); + Luid result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device5*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device6.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device6.cs index dc0f5a5..b10a40d 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device6.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device6.cs @@ -402,7 +402,8 @@ public unsafe partial struct ID3D12Device6 [VtblIndex(43)] public Luid GetAdapterLuid() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device6*)Unsafe.AsPointer(ref this)); + Luid result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device6*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device7.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device7.cs index 6d805c9..2ae7857 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device7.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device7.cs @@ -402,7 +402,8 @@ public unsafe partial struct ID3D12Device7 [VtblIndex(43)] public Luid GetAdapterLuid() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device7*)Unsafe.AsPointer(ref this)); + Luid result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device7*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device8.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device8.cs index 64a10f9..eae961c 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device8.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device8.cs @@ -402,7 +402,8 @@ public unsafe partial struct ID3D12Device8 [VtblIndex(43)] public Luid GetAdapterLuid() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device8*)Unsafe.AsPointer(ref this)); + Luid result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device8*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device9.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device9.cs index 12076d1..9bb4748 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device9.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12Device9.cs @@ -402,7 +402,8 @@ public unsafe partial struct ID3D12Device9 [VtblIndex(43)] public Luid GetAdapterLuid() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device9*)Unsafe.AsPointer(ref this)); + Luid result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[43]))((ID3D12Device9*)Unsafe.AsPointer(ref this), &result); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12SwapChainAssistant.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12SwapChainAssistant.cs index 08e7113..6f60cbc 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12SwapChainAssistant.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct3D12/ID3D12SwapChainAssistant.cs @@ -80,7 +80,8 @@ public unsafe partial struct ID3D12SwapChainAssistant [VtblIndex(3)] public Luid GetLUID() { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID3D12SwapChainAssistant*)Unsafe.AsPointer(ref this)); + Luid result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID3D12SwapChainAssistant*)Unsafe.AsPointer(ref this), &result); } ///