STA and MTA and COM Logger
hello,
i am working on a COM logger. earlier i had a problem of COM marshalling in the Clients of COM logger.i read some document then found that if i change the threading model to MTA then i do not need to marshall the COM interface. the only thing i have to do is to protect the instance data as well due to concurrency problem.
i solved it with critical sections.
now here comes the problem. i have another COM object which is in STA. it creates number of threads in it.
i call CoInitializeEx(NULL,COINIT_MULTITHREADED); in each thread. when i try to log from those threads
i get "he application called an interface that was marshalled for a different thread".
how do i log data from different threads in STA COM object having MTA COM logger in it ??
regards
deep