次の方法で共有


CoreWebView2.CreateFromComICoreWebView2(IntPtr) Method

Definition

Creates a CoreWebView2 object that wraps an existing COM ICoreWebView2 object. This allows interacting with the CoreWebView2 using .NET, even if it was originally created using COM.

public static Microsoft.Web.WebView2.Core.CoreWebView2 CreateFromComICoreWebView2 (IntPtr value);
static member CreateFromComICoreWebView2 : nativeint -> Microsoft.Web.WebView2.Core.CoreWebView2
Public Shared Function CreateFromComICoreWebView2 (value As IntPtr) As CoreWebView2

Parameters

value
IntPtr

nativeint

Pointer to a COM object that implements the ICoreWebView2 COM interface.

Returns

Returns a .NET CoreWebView2 object that wraps the COM object.

Exceptions

Thrown when the provided COM pointer is null.

Thrown when the value is not an ICoreWebView2 COM object and cannot be wrapped.

Applies to