Deployment
You have to deploy the AntView control itself. Depending on if your application is 32 bit or 64 bit, you'll have to install the ActiveX control that matches the bitness of the application in which you want to use it. You can have both 32 bit as well as 64 bit installed at the same time.
Our installer puts the 64 bit .ocx file here:
C:\Program Files (x86)\AntView\Win64
and the 32 bit AntView.ocx file can be found here:
C:\Program Files (x86)\AntView\Win32
Beyond the control itself there are 2 dependencies.
1.) The webview2loader DLL from Microsoft.
This file has to be in the same folder as your application.
Beware that this DLL also has to be the same bitness as your main application.
There's a 32 bit version and a 64 bit version and they both have the exact same name.
You can find these files in the same folder as the .ocx file (see above).
Beware that Microsoft updates this DLL every now and then.
As such you must take care to deploy the current DLL that was supplied with AntView.
AntView < 1.0.96 = WebView2Loader.dll version 1.0.864.35
AntView >= 1.0.96 = WebView2Loader.dll version 1.0.1108.44
In case you want to put the DLL in another location, there's also: WebView2LoaderPath.
2.) The Microsoft Edge WebView2 evergreen installer.
It is not enough for the user to have the MS Edge browser installed.
In order to be able to use WebView2 they also need to have the full component installed.
You can install the WebView2 runtime on the following versions of Windows.
- Windows 11
- Windows 10
- Windows Server 2022
- Windows Server 2019
- Windows Server 2016
- Windows Server 2012 (*)
- Windows Server 2012 R2 (*)
Windows 11 already has the WebView2 runtime so you don't need to install it there.
Note that you can't uninstall the WebView2 runtime from windows 11 either.
We recommend you to use the evergreen installer. MS WebView2 download page
The recommendation is to run the installer elevated (as admin) because in that case it will install machine wide, otherwise it will only install the WebView2 runtime for the current user.
Note that if the WebView2 runtime is already installed then that installer will keep the installed version. You cannot update the evergreen install manually, it is completely managed.
The ocx file itself needs to be registered via either regsvr32 or by your installation program.
If you need to register the control(s) manually then use a command prompt in Administrator mode and navigate to the folder where you installed Antview (by default: C:\Program Files (x86)\AntView)
Then register the version of AntView that you want to use (either 32 bit, 64 bit, or both)
cd Win32
regsvr32 antview.ocx
One thing to look out for is that if you put the .ocx on a network drive that you then should not use a mapped network drive location, but instead use UNC folder notation.
eg. if your network location is F:\ which is mapped against folder \\SERVER\myApp
Do not register the ocx as regsvr32 -i F:\MyApp\AntView.ocx, but instead use regsvr32 -i \\SERVER\MyApp\AntView.ocx
(*) Note that Microsoft has announced that Windows 2012/Windows 2012 R2 is supported until October 2023.
What about older versions of Windows?
Support for Windows 7 / Windows 8/8.1 and Windows Server 2008 R2 was removed by Microsoft on January 10th, 2023, see also Microsoft Edge supported Operating Systems
The following blogpost mentions how-to install on a now unsupported operating system: Microsoft Edge and WebView2 ending support for Windows 7 and Windows 8/8.1
Quote from the blog post:
After end of support, future attempts to install the Evergreen WebView2 Runtime on Windows 7 and Windows 8/8.1 will install version 109.
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/25/2024