Board index » delphi » I simply Create a MTS and runs well in the Main App GUI.

I simply Create a MTS and runs well in the Main App GUI.

Cannot Call the MTS function in Mutilthread!

I simply Create a MTS and runs well in the Main App GUI.
But when I use a Thread to call the MTS function,it always raise an
Exception which says '.exe raised exception class EOleException with message
'sign does not quote storage'
I try Apartment Thread Module and Both Thread  Module but I can not work it
out.
Why ? Please help me!

 mtsThread:=ComtsTestThread.Create;

 

Re:I simply Create a MTS and runs well in the Main App GUI.


Have you called CoInitialize(NIL) in the context of the thread?

Quote
"Thomas Wang" <thomas7...@hotmail.com> wrote in message

news:3baffd34_2@dnews...
Quote
> Cannot Call the MTS function in Mutilthread!

> I simply Create a MTS and runs well in the Main App GUI.
> But when I use a Thread to call the MTS function,it always raise an
> Exception which says '.exe raised exception class EOleException with
message
> 'sign does not quote storage'
> I try Apartment Thread Module and Both Thread  Module but I can not work
it
> out.
> Why ? Please help me!

>  mtsThread:=ComtsTestThread.Create;

Other Threads