You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I would like to use Webview2‘s C API. Thanks to #1124 I have been able to display the browser window. However, I am having a struggle to set AdditionalBrowserArguments for "--enable-features=msWebView2EnableDraggableRegions" (using CreateCoreWebView2EnvironmentWithOptions) even after consulting #3605, #2243 and #286.
Here is a pseudo code of what I did:
ICoreWebView2EnvironmentOptionsVtbl lpVtbl =
{
QueryInterface, // this was defined
AddRef, // this was defined
Release, // this was defined
.get_AdditionalBrowserArguments = getAdditionalBrowserArguments, // this was defined
.put_AdditionalBrowserArguments = putAdditionalBrowserArguments // this was defined
};
ICoreWebView2EnvironmentOptions envOptions = { &lpVtbl };
CreateCoreWebView2EnvironmentWithOptions(NULL, NULL, &envOptions, &environmentCreatedHandler)
This causes access violation. Please note that if I replace &envOptions with null the window opens but obviously without any AdditionalBrowserArguments.
Here are my questions:
How can I make this setting in C?
It seems WebView2‘ C API are meant to be used in a particular way. How are they supposed to be used - any guidance/documentation will be very appreciated?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I would like to use Webview2‘s C API. Thanks to #1124 I have been able to display the browser window. However, I am having a struggle to set
AdditionalBrowserArguments
for"--enable-features=msWebView2EnableDraggableRegions"
(usingCreateCoreWebView2EnvironmentWithOptions
) even after consulting #3605, #2243 and #286.Here is a pseudo code of what I did:
This causes access violation. Please note that if I replace
&envOptions
with null the window opens but obviously without anyAdditionalBrowserArguments
.Here are my questions:
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions