次の方法で共有


interface ICoreWebView2ProcessExtendedInfo

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

interface ICoreWebView2ProcessExtendedInfo
  : public IUnknown

Provides process with associated extended information in the ICoreWebView2Environment.

Summary

Members Descriptions
get_AssociatedFrameInfos The collection of associated FrameInfos which are actively running (showing or hiding UI elements) in this renderer process.
get_ProcessInfo The process info of the current process.

Applies to

Product Introduced
WebView2 Win32 N/A
WebView2 Win32 Prerelease

Members

get_AssociatedFrameInfos

The collection of associated FrameInfos which are actively running (showing or hiding UI elements) in this renderer process.

public HRESULT get_AssociatedFrameInfos(ICoreWebView2FrameInfoCollection ** frames)

AssociatedFrameInfos will only be populated when this CoreWebView2ProcessExtendedInfo corresponds to a renderer process. Non-renderer processes will always have an empty AssociatedFrameInfos. The AssociatedFrameInfos may also be empty for renderer processes that have no active frames.

                            std::wstringstream rendererProcess;
                            wil::com_ptr<ICoreWebView2FrameInfoCollection> frameInfoCollection;
                            CHECK_FAILURE(processExtendedInfo->get_AssociatedFrameInfos(
                                &frameInfoCollection));
                            wil::com_ptr<ICoreWebView2FrameInfoCollectionIterator> iterator;
                            CHECK_FAILURE(frameInfoCollection->GetIterator(&iterator));
                            BOOL hasCurrent = FALSE;
                            UINT32 frameInfoCount = 0;
                            while (SUCCEEDED(iterator->get_HasCurrent(&hasCurrent)) &&
                                   hasCurrent)
                            {
                                wil::com_ptr<ICoreWebView2FrameInfo> frameInfo;
                                CHECK_FAILURE(iterator->GetCurrent(&frameInfo));

                                AppendFrameInfo(frameInfo, rendererProcess);

                                BOOL hasNext = FALSE;
                                CHECK_FAILURE(iterator->MoveNext(&hasNext));
                                frameInfoCount++;
                            }
                            rendererProcessInfos
                                << frameInfoCount
                                << L" frameInfo(s) found in Renderer Process ID:" << processId
                                << L"\n"
                                << rendererProcess.str() << std::endl;

get_ProcessInfo

The process info of the current process.

public HRESULT get_ProcessInfo(ICoreWebView2ProcessInfo ** processInfo)