Print Page | Close Window

WebView2

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=24448
Printed Date: 14 May 2024 at 10:47pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: WebView2
Posted By: rdhd
Subject: WebView2
Date Posted: 05 January 2024 at 9:17am
We have encountering issues using ToolkitPro when it comes to the Microsoft WebView2 functionality. CodeJock has copied some old Microsoft include files into its folder structure and included it in the product. Meanwhile, Microsoft has greatly enhanced WebView2 with functionality we need to use such as ICoreWebView2Environment2/3/4/5 and other interfaces.

This is making us jump thru hoops to try to include the Microsoft include files without the compiler latching onto the CodeJock copies of these.

Why has CodeJock decided to do this. We always want to use the latest Microsoft provided functionality. I am searching around to see how to turn off this CodeJock code so we don't compile it in or at least use the Microsoft include files without having to copy the Microsoft files over top of the CodeJock ones.

Is there some directive I can comment out in the CJ source that will prevent CJ from including their version of these files? How do other CJ consumers handle this issue?



Replies:
Posted By: dbrookes
Date Posted: 14 January 2024 at 10:20pm
I ran into the same issue a few months ago.

My workaround was to include WebView2.h from the Microsoft.Web.WebView2 nuget package before the include of XTToolkitPro.h in our precompiled header. The __webview2_h__ header guard in WebView2.h stubs out the XTP's older WebView2 header when it is included. But arguably WebView2 shouldn't really need to be in the precompiled header.

A macro to exclude XTP's WebView2 from our project(s) and or from the XTP build itself might be nice. Especially for those who happen to be using WebView2/WebView2Loader without XTP.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net