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
Louis
  • 660
  • 1
  • 7
  • 14
  • Is it possible to add the complete exception with its stack trace and exact message to this question? It will be much easier to help in this case. – Anna Dolbina Apr 03 '20 at 12:07
  • Anna, thank you for replying my question. I added the stack above. – Louis Apr 03 '20 at 12:50
  • As I can see from the stack trace, there is an issue related to re-using already unpacked Chromium binaries. I can recommend enabling logging in DotNetBrowser and providing these logs to the support team. You can also check yourself if the binaries were unpacked properly and your .NET application has all the proper rights to access and use them. In addition, there might be some antivirus software that restricts the access rights. – Anna Dolbina Apr 03 '20 at 12:58

1 Answers1

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

Anna Dolbina
  • 1
  • 1
  • 8
  • 9
  • This might be the issue. Our COM object is usually registered in a different folder from where a calling application is. Let me send you an email to customer-care@teamdev.com to explain further later. – Louis Apr 03 '20 at 13:42