dotNetBrowser: Creating engine causes an exception

1

I am trying to embed the browser into a COM object. But when I try to create an engine instance like so:

_browserView = new BrowserView { Dock = DockStyle.Fill };
try
{
    _engine = EngineFactory.Create(new EngineOptions.Builder
                            {
                                RenderingMode = RenderingMode.HardwareAccelerated
                            }
                            .Build());
}
catch (Exception e)
{
    LogException("*** Engine create exception: " + e.Message.ToString());
}

I always get this exception: "The specified procedure could not be found". Can someone please tell me what procedure is missing here? If I copy the same code into a vanilla C# WinForms project. Everything works fine.

Thank you.

PS: I'm adding the full exception stack here:

System.ComponentModel.Win32Exception (0x80004005): The specified procedure could not be found
   at DotNetBrowser.Internals.Ipc.Libraries.NativeLibraryHelperWin.LoadNativeLibrary(String path, String dllName)
   at DotNetBrowser.Internals.Ipc.Libraries.NativeLibraryHelperFactory.CreateHelper(String path, String nativeLibraryName)
   at DotNetBrowser.Internals.Ipc.Libraries.NativeLibraryBase..ctor(String path, Type libraryType)
   at DotNetBrowser.Internals.Ipc.Libraries.SharedMemoryLibrary..ctor(String path)
   at DotNetBrowser.Internals.Ipc.Libraries.SharedMemoryLibrary.GetOrCreate(String path)
   at DotNetBrowser.Internals.Ipc.ConnectionServer..ctor(String ipcLibraryPath, String optionsLicenseKey)
   at DotNetBrowser.Internals.Ipc.ChromiumIpc..ctor(EngineOptions options)
   at DotNetBrowser.Internals.Ipc.ChromiumIpc.Create(EngineOptions options)
   at DotNetBrowser.Engine.EngineRpcService..ctor(EngineOptions options)
   at DotNetBrowser.Engine.EngineFactory.Create(EngineOptions options)
   at CreateBrowser() in C:\CurrProj\DVRs\AxCtrl\AxCtrl.cs:line 111
dotnetbrowser
asked on Stack Overflow Apr 1, 2020 by Louis • edited Apr 3, 2020 by Louis

1 Answer

0

According the stack trace, DotNetBrowser fails to re-use already unpacked Chromium binaries.

You can check yourself if the binaries were unpacked properly and your .NET(COM) application has all the proper rights to access and use them. In addition, there might be some antivirus software that restricts the access rights.

In case of any further questions, feel free to contact us at customer-care@teamdev.com

answered on Stack Overflow Apr 3, 2020 by Anna Dolbina

User contributions licensed under CC BY-SA 3.0