diff --git a/WinFormsComInterop/WebView2/ICoreWebView2Wrapper.cs b/WinFormsComInterop/WebView2/ICoreWebView2Wrapper.cs index 699fbcf..6fe06b9 100644 --- a/WinFormsComInterop/WebView2/ICoreWebView2Wrapper.cs +++ b/WinFormsComInterop/WebView2/ICoreWebView2Wrapper.cs @@ -5,8 +5,9 @@ namespace WinFormsComInterop.WebView2; [RuntimeCallableWrapper(typeof(webview2::Microsoft.Web.WebView2.Core.Raw.ICoreWebView2))] -[RuntimeCallableWrapper(typeof(Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Private))] -[RuntimeCallableWrapper(typeof(Microsoft.Web.WebView2.Core.Raw.ICoreWebView2PrivatePartial))] +//[RuntimeCallableWrapper(typeof(Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Private))] +//[RuntimeCallableWrapper(typeof(Microsoft.Web.WebView2.Core.Raw.ICoreWebView2PrivatePartial))] +[RuntimeCallableWrapper(typeof(webview2::Microsoft.Web.WebView2.Core.Raw.ICoreWebView2PrivatePartial))] internal partial class ICoreWebView2Wrapper { public readonly IntPtr instance; diff --git a/facades/Microsoft.Web.WebView2.Core/Raw/ICoreWebView2PrivatePartial.cs b/facades/Microsoft.Web.WebView2.Core/Raw/ICoreWebView2PrivatePartial.cs new file mode 100644 index 0000000..5cdfa51 --- /dev/null +++ b/facades/Microsoft.Web.WebView2.Core/Raw/ICoreWebView2PrivatePartial.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Web.WebView2.Core.Raw; + +[ComImport] +[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] +[Guid("2C94DD56-E252-40A1-BA7E-B19417B26A60")] +public interface ICoreWebView2PrivatePartial +{ + [MethodImpl(MethodImplOptions.InternalCall)] + void AddHostObjectHelper([In][MarshalAs(UnmanagedType.Interface)] ICoreWebView2PrivateHostObjectHelper helper); +} diff --git a/samples/BlazorHybrid/BlazorHybrid.csproj b/samples/BlazorHybrid/BlazorHybrid.csproj index e70ea67..c958228 100644 --- a/samples/BlazorHybrid/BlazorHybrid.csproj +++ b/samples/BlazorHybrid/BlazorHybrid.csproj @@ -8,8 +8,10 @@ enable true + <_SuppressWinFormsTrimError>true - true false @@ -20,6 +22,7 @@ +