Community

COMException when trying to assign document to the Synchronizer

Hello,

I have the following code and am working in Visual Studio 2013:

            ComponentSynchronizer Synchronizer = new ComponentSynchronizer();
            Synchronizer.DocumentViewer =                   (FineReaderVisualComponents.DocumentViewer)axDocumentViewer2.GetOcx();
            IEngineLoader loader = new FREngine.OutprocLoader();
            IEngine engine = loader.GetEngineObject("xxx");
            engine.ParentWindow = this.Handle.ToInt32();
            engine.ApplicationTitle = this.Text;

            document = engine.CreateFRDocumentFromImage(@"mypdf.pdf", null);

            Synchronizer.Document = document;
            //axDocumentViewer2.FRDocument = document;
            document.Close();

But both Synchronizer.Document = document; and axDocumentViewer2.FRDocument = document; cause a COMException in the dll AxInterop.FineReaderVisualComponents.

The details state "Access violation - no RTTI data!".

Best Regards

0

Comments

1 comment

  • Avatar
    Oksana Serdyuk

    Please sorry for the delay with response.

    It is impossible to use Visual Components together with the OutprocLoader object, as the components need to work with the Engine internal objects and in case of the OutprocLoader usage they will be in the separate processes. Please see the Developer's Help file > Guided Tour > Programming Aspects > Different Ways to Load the Engine Object for details.

    0
    Comment actions Permalink

Please sign in to leave a comment.