Board index » delphi » Calling Interface methods from another thread?

Calling Interface methods from another thread?

      Hi.

  I have implemented multithreaded application in which i whant to call from
one thread methods of com-object created in another thread. But I'v got
error: 'Application is trying to call methods of interface which belongs to
another thread'. I know that Ihave to marshall interface to use it in
another thread. But i do not know how to do it in Delphi.

Any sugestions? Thank you in advance. Please reply by e-mail.

Regards.

_________________________________________________
Alex V. Ognev.
Moscow State University. Computer Science Departament.
Golden Pages Publishing House.
ASANA Inc.

 

Re:Calling Interface methods from another thread?


Use MarshallInterthreadInterfaceToStream and
UnmarshallInterthreadInterfaceAndReleaseStream API call. See Win32 SDK.

Alex V. Ognev p1e ve zprv <6b6ss7$6...@forums.borland.com>?

Quote
>  I have implemented multithreaded application in which i whant to call
from
>one thread methods of com-object created in another thread. But I'v got
>error: 'Application is trying to call methods of interface which belongs to
>another thread'. I know that Ihave to marshall interface to use it in
>another thread. But i do not know how to do it in Delphi.

>Any sugestions? Thank you in advance. Please reply by e-mail.

begin 666 Pavel Cisar.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..D-I<V%R.U!A=F5L#0I&3CI0
M879E;"!#:7-A<@T*3U)'.D%+5$E3(&$N<RX-"D%$4CM73U)+.CL[3F$@5F%L
M96YT:6YC92 Q.U!R86AA(#4[.S$U," P,#M#>F5C:"!297!U8FQI8PT*3$%"
M14P[5T]22SM%3D-/1$E.1SU154]4140M4%))3E1!0DQ%.DYA(%9A;&5N=&EN
M8V4@,3TP1#TP05!R86AA(#4@,34P(# P/3!$/3!!0WIE8V@@4F5P=6)L:6,-
M"E523#H-"E523#IH='1P.B\O=W=W+F%K=&ES+F-Z#0I%34%)3#M04D5&.TE.
M5$523D54.G!C:7-A<D!A:W1I<RYC>@T*4D56.C$Y.3@P,C S5#$R-34R-%H-
,"D5.1#I60T%21 T*
`
end
end

Other Threads