Hi,
Something for the Logos Developers please. Context https://wiki.logos.com/Logos_4_COM_API
Firstly, I'm pleased that the Logos 4 COM API is still in the product, and was not silently dropped, in case I'm one of the last three people still using it or something ...
My PC: Windows 10 Pro 64 bit, Anniversary Update, Version 1607 (OS Build 14393.222)
Logos: 7.1.0.0025
Using Microsoft Visual Studio Pro 2015, Update 3.
Programming in VB.Net and using fresh code I'm rewriting, to try and pick up a "master plan" I began working on 3 or 4 years ago ...
Leaving aside all the Control.InvokeRequired() nightmares if wanting to write something during the LogosApplication Event Handlers ... which I now have working.
My issue is that a simple button on the main VB.Net Form to call LogosApplication.ListPanels() is unable to obtain the LogosPanel.Details object. (Same issue within the LogosApplication.PanelChanged event.)
The error displayed within the debugger, including if I stop at a breakpoint to inspect a Panel object is:
Details = {System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
--- End of inner exception
The debugger knows that Panel is a system.__ComObject
To be clear, this is both during an event handler of the LogosApplication object, but also a simple Form.Button Click handler calling ListPanels and attempting to inspect each Panel.
The Button Click code in question is as follows:
For Each panel In app.GetOpenPanels()
PanelDecode(panel)
Next
So my question please:
Is this a bug in the current release of Logos 7, or in my code, or something about how Windows 10 and COM support now works, or something else?
I'm guessing Microsoft changed something about how Windows 10 is permitted (or NOT) to reach back to something in COM.
Thanks, and sorry to those who have little idea about everything above.
Regards,
Jim