ICoreWebView2SharedBuffer

Undocumented in source.
version(Windows && inline_webview2_bindings && all)
interface ICoreWebView2SharedBuffer : IUnknown {
static const
GUID iid;
}

Members

Functions

Close
HRESULT Close()

Release the backing shared memory. The application should call this API when no access to the buffer is needed any more, to ensure that the underlying resources are released timely even if the shared buffer object itself is not released due to some leaked reference. After the shared buffer is closed, the buffer address and file mapping handle previously obtained becomes invalid and cannot be used anymore. Accessing properties of the object will fail with RO_E_CLOSED. Operations like Read or Write on the IStream objects returned from OpenStream will fail with RO_E_CLOSED. PostSharedBufferToScript will also fail with RO_E_CLOSED.

OpenStream
HRESULT OpenStream(IStream** value)

Get an IStream object that can be used to access the shared buffer.

get_Buffer
HRESULT get_Buffer(BYTE** value)

The memory address of the shared buffer.

get_FileMappingHandle
HRESULT get_FileMappingHandle(HANDLE* value)

Returns a handle to the file mapping object that backs this shared buffer. The returned handle is owned by the shared buffer object. You should not call CloseHandle on it. Normal app should use Buffer or OpenStream to get memory address or IStream object to access the buffer. For advanced scenarios, you could use file mapping APIs to obtain other views or duplicate this handle to another application process and create a view from the duplicated handle in that process to access the buffer from that separate process.

get_Size
HRESULT get_Size(UINT64* value)

The size of the shared buffer in bytes.

Meta