I
igd
I am forced to decorate my .NET Main()-method with [STAThread()], since
an unmanaged function (which i am calling through P/Invoke) calls
CoCreateInstance() in turn. The problem is, that another unmanaged
function starts a new thread which invokes a callback function. This
callback function is a delegate in my .NET app and since it is executed
in a STA (Singe Threaded Appartment), the callback function/delegate
can not called right. Is there a possibility to fix this dilemma?
Thanks in advance!
- igd -
an unmanaged function (which i am calling through P/Invoke) calls
CoCreateInstance() in turn. The problem is, that another unmanaged
function starts a new thread which invokes a callback function. This
callback function is a delegate in my .NET app and since it is executed
in a STA (Singe Threaded Appartment), the callback function/delegate
can not called right. Is there a possibility to fix this dilemma?
Thanks in advance!
- igd -