Is CreateCoreWebView2Environment function part of WebView2.tlb?

Vishnu Gopalakrishnan 126 Reputation points
2023-03-17T02:26:24.2766667+00:00

I am writing a win32 WebView2 client application. I would like to include a very minimal build dependencies to the application rather than including the entire WebView2 package. For that, is it enough to use WebView2.tlb?

My problem is that WebView2.tlb does not contain the CreateCoreWebView2EnvironmentWithOptions function. Is this understanding correct?

To avoid the build error, I have forced to include WebView2EnvironmentOptions.h & WebView2Loader.dll.lib. Is there any better way to avoid this build dependency just by using WebView2.tlb?

Looking forward to hearing from you.

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,377 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,677 questions
0 comments No comments
{count} votes

Accepted answer
  1. Xiaopo Yang - MSFT 12,726 Reputation points Microsoft Vendor
    2023-03-17T06:31:37.34+00:00

    There is more information at Get started with WebView2 in Win32 apps, which includes some samples. It's necessary to include headers with the WebView2 SDK installed.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.