Link to home
Start Free TrialLog in
Avatar of henrikatwork
henrikatworkFlag for Sweden

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
Avatar of Robn
Robn

How are you calling CoInitialize?
Have you tried this...
CoInitializeEx(nil, COINIT_MULTITHREADED);
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?
Avatar of henrikatwork

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
ASKER CERTIFIED SOLUTION
Avatar of andrewjb
andrewjb
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial