I have aDLL
based in .NET
which I expose to native applications using COM
. It seems to run fine most of the time, however, using logs, I have seen that on some occasions, the DLL, when doing some work for an application, say Application A, gets interrupted, and instead takes up the work for Application B, which starts from the beginning. The work for Application A is entirely abandoned.
TheDLL
is registered forCOM
of course, and is present in the GAC
.
I am new to COM
, and I suppose this has something to do with the Apartment model
, single threaded
Vs. Multi threaded
?I had read in the beginning that if one uses.NET
components and have them exposed as COM
objects, then one need not worry about it most of the times.
Is it likely that it is indeed the Apartment which is causing this issue, and what can I do to fix this? Is there an attribute to declare a particular apartment model?
Thanks..