BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ActiveX and multithreaded COM

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage
View previous topic :: View next topic  
Author Message
Hannes
Guest





PostPosted: Tue Jan 24, 2006 10:47 am    Post subject: ActiveX and multithreaded COM Reply with quote



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

Back to top
Riki Wiki
Guest





PostPosted: Sat Jan 28, 2006 11:24 am    Post subject: Re: ActiveX and multithreaded COM Reply with quote



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>
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.