My application is in C# and the 3. party I am working with is closed source C++. I have access to the third-party library as .dll
's and .h
files.
I access the code using Platform Invoke
When using the third-party library I start by calling a function InitBase(...)
which creates and returns a Base
struct. But it is only allowed to have ONE base at a time.
One base can only perform one task. I want to be able to perform multiple tasks at a time (multithreaded).
Is it possible call the 3. party library with platform invoke from different threads where the threads don't interfere with each other in the third-party library? I would prefer each thread have a complete separate memory chuck while in the third-party library, so from the third-party libraries point of view, it is still the only instance existing.
If it is not possible I have to run my application in multiple processes as the only way to make it "multithreaded".