Thread View: borland.public.delphi.activex.controls.using
2 messages
2 total messages
Started by Hannes
Tue, 24 Jan 2006 10:47
ActiveX and multithreaded COM
Author: Hannes
Date: Tue, 24 Jan 2006 10:47
Date: Tue, 24 Jan 2006 10:47
37 lines
2056 bytes
2056 bytes
Hi,
-we have a COM -Library we want to use from several threads from our
client
-we also have a ActiveX control written in C++ using MFC. The control
contains several ATL-Controls we want to access from different threads
from our client
-our client is a multihreaded delphi application
When we set the CoinitFlags to MULTITHREADED in the delphi main thread,
the ActiveX Control throws the exception "Could not obtain OLE window
handle"
/**********
program CadTest;
uses
Forms,
CadTestFrm in 'CadTestFrm.pas' {frmForm1},
ComObj,
ActiveX,
CadTestThread in 'CadTestThread.pas';
{$R *.res}
begin
CoinitializeEx(nil, COINIT_MULTITHREADED);
Application.Initialize;
Application.CreateForm(TfrmForm1, frmForm1);
Application.Run;
end.
/************
The question is how we handle the ActiveX which requires a STA and the
COM/ATL stuff which is supposed to run in a MTA together from one
client.
Thanks Hannes
Re: ActiveX and multithreaded COM
Author: Riki Wiki
Date: Sat, 28 Jan 2006 11:24
Date: Sat, 28 Jan 2006 11:24
10 lines
1174 bytes
1174 bytes
Hoi Hannes You need to repost your question on the Borland news server to make everybody see it and possibly answer your question. Further, this news group do not officially exist, the group to use is b.p.d.com.activex.using. Take a look here: <http://tinyurl.com/8m5nw> which links to <http://delphi.wikicities.com/wiki/Delphi_Newsgroups>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads