Hi,
I'm trying to integrate to a 3rd party .NET assembly (Creditcall ChipDNA SDK - Pre-Certified - https://www.creditcall.com/developers) and I'm hitting the dreaded "You are trying to use a multi-threaded .NET object in a way that is not supported. The ABL cannot be called on a thread other than the main thread. (15740) " error.
From what I can gather, I need to write a wrapper assembly in C#/VB.NET to raise the events to the main thread. However I'm struggling to find any example code where people have done this (I'm not too familiar with either language).
Has anybody ever successfully integrated an assembly that uses multi-threaded events?
Thanks
Andrew
What did worked for me was to save the current dispatcher in the wrapper constructor and then use that with invoke to either call back on OE handler that you get injected in the constructor or you just publish an event to which you subscribe to from OE side…
What did worked for me was to save the current dispatcher in the wrapper constructor and then use that with invoke to either call back on OE handler that you get injected in the constructor or you just publish an event to which you subscribe to from OE side…
Thanks Marian,
That's saved my bacon! I was missing a reference to WindowsBase.dll in my C# assembly project, and thus was trying various Invoke and BeingInvoke calls, only to be told they didn't exist!
Andrew