Browse Source

Fix #6603: PInvokeStackImbalance error caused by incorrect signature for WindowsDeleteString function.

When PreserveSig=false, a function that natively returns an HRESULT and has no final [out] parameter should instead be marked as void.
pull/8016/head
Kevin Ivarsen 5 years ago
parent
commit
5bacd91443
  1. 2
      src/Windows/Avalonia.Win32/WinRT/NativeWinRTMethods.cs

2
src/Windows/Avalonia.Win32/WinRT/NativeWinRTMethods.cs

@ -23,7 +23,7 @@ namespace Avalonia.Win32.WinRT
[DllImport("api-ms-win-core-winrt-string-l1-1-0.dll",
CallingConvention = CallingConvention.StdCall, PreserveSig = false)]
internal static extern unsafe IntPtr WindowsDeleteString(IntPtr hString);
internal static extern unsafe void WindowsDeleteString(IntPtr hString);
[DllImport("Windows.UI.Composition", EntryPoint = "DllGetActivationFactory",
CallingConvention = CallingConvention.StdCall, PreserveSig = false)]

Loading…
Cancel
Save