Skip to content

Latest commit

 

History

History
89 lines (60 loc) · 4.42 KB

icorewebview2processfailedeventargs2.md

File metadata and controls

89 lines (60 loc) · 4.42 KB
description title ms.date keywords topic_type api_name api_type api_location
A continuation of the ICoreWebView2ProcessFailedEventArgs interface.
WebView2 Win32 C++ ICoreWebView2ProcessFailedEventArgs2
04/22/2024
IWebView2, IWebView2WebView, webview2, webview, win32 apps, win32, edge, ICoreWebView2, ICoreWebView2Controller, browser control, edge html, ICoreWebView2ProcessFailedEventArgs2
APIRef
ICoreWebView2ProcessFailedEventArgs2
ICoreWebView2ProcessFailedEventArgs2.get_ExitCode
ICoreWebView2ProcessFailedEventArgs2.get_FrameInfosForFailedProcess
ICoreWebView2ProcessFailedEventArgs2.get_ProcessDescription
ICoreWebView2ProcessFailedEventArgs2.get_Reason
COM
embeddedbrowserwebview.dll

interface ICoreWebView2ProcessFailedEventArgs2

[!INCLUDE deprecation-note]

interface ICoreWebView2ProcessFailedEventArgs2
  : public ICoreWebView2ProcessFailedEventArgs

A continuation of the ICoreWebView2ProcessFailedEventArgs interface.

Summary

Members Descriptions
get_ExitCode The exit code of the failing process, for telemetry purposes.
get_FrameInfosForFailedProcess The collection of FrameInfos for frames in the ICoreWebView2 that were being rendered by the failed process.
get_ProcessDescription Description of the process assigned by the WebView2 Runtime.
get_Reason The reason for the process failure.

Applies to

Product Introduced
WebView2 Win32 1.0.818.41
WebView2 Win32 Prerelease 1.0.824

Members

get_ExitCode

The exit code of the failing process, for telemetry purposes.

public HRESULT get_ExitCode(int * exitCode)

The exit code is always STILL_ACTIVE (259) when ProcessFailedKind is COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE.

get_FrameInfosForFailedProcess

The collection of FrameInfos for frames in the ICoreWebView2 that were being rendered by the failed process.

public HRESULT get_FrameInfosForFailedProcess(ICoreWebView2FrameInfoCollection ** frames)

The content in these frames is replaced with an error page. This is only available when ProcessFailedKind is COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED; frames is null for all other process failure kinds, including the case in which the failed process was the renderer for the main frame and subframes within it, for which the failure kind is COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED.

get_ProcessDescription

Description of the process assigned by the WebView2 Runtime.

public HRESULT get_ProcessDescription(LPWSTR * processDescription)

This is a technical English term appropriate for logging or development purposes, and not localized for the end user. It applies to utility processes (for example, "Audio Service", "Video Capture") and plugin processes (for example, "Flash"). The returned processDescription is empty if the WebView2 Runtime did not assign a description to the process.

The caller must free the returned string with CoTaskMemFree. See API Conventions.

get_Reason

The reason for the process failure.

public HRESULT get_Reason(COREWEBVIEW2_PROCESS_FAILED_REASON * reason)

Some of the reasons are only applicable to specific values of ICoreWebView2ProcessFailedEventArgs::ProcessFailedKind, and the following ProcessFailedKind values always return the indicated reason value:

ProcessFailedKind Reason
COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED
COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE COREWEBVIEW2_PROCESS_FAILED_REASON_UNRESPONSIVE

For other ProcessFailedKind values, the reason may be any of the reason values. To learn about what these values mean, see COREWEBVIEW2_PROCESS_FAILED_REASON.