henrikatwork
asked on
B-I-G COM -problem
Hi all,
My Project has a big problem - we are using COM Components (ADO, MSXML) in a multithreaded application. As soon as we run the application on a multithreaded processor, it crashes. The MSDN says that we have to do some kind of proxy in order to use the MSXML in a multithreaded app. Can anyone please give me some hints on how to do this? Have anyone used COM in a multithreaded app?
cheers,
henrik
My Project has a big problem - we are using COM Components (ADO, MSXML) in a multithreaded application. As soon as we run the application on a multithreaded processor, it crashes. The MSDN says that we have to do some kind of proxy in order to use the MSXML in a multithreaded app. Can anyone please give me some hints on how to do this? Have anyone used COM in a multithreaded app?
cheers,
henrik
listening ...
You need to CoInitialize in each thread.
And you can't just pass COM interface pointers between threads - they must be marshalled. Are you doing this?
And you can't just pass COM interface pointers between threads - they must be marshalled. Are you doing this?
ASKER
nope, how do I do the marshallening? I've never been doing that with Delphi, can you maybe give me an hint?
cheers,
henrik
cheers,
henrik
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you tried this...
CoInitializeEx(nil, COINIT_MULTITHREADED);