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 

Using COM objects in new threads

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi WinAPI
View previous topic :: View next topic  
Author Message
Lion-O
Guest





PostPosted: Fri Mar 17, 2006 11:03 am    Post subject: Using COM objects in new threads Reply with quote



Hello

I am after some advice. I have a created a simple menu application
which is used to execute various COM objects. Each COM object is
created in a seperate thread and run. These COM objects (apartment
threading model?) can then fire up various DLL functions. The reason
why I took this route was because modal forms in COM objects created in
the main thread caused my main form to disable. I am getting various
access violations, and I am not sure whether this is due to a wrong
program setup. Brief structure below:

Program:

procedure btnclick1
begin
TMyThread.Create //COM Obj1
TMyThread.Create //COM Obj2
end

TMyThread:

procedure Execute
begin
try
//execute COM object that was created in constructor
except
end
end

COM Object:

procedure Fire
begin
//execute DLL function
end

However, I get no access violations if I call the DLL functions from
the thread (No COM object). Of course, this is not an option.

Any help will be appreciated.

Thanks
Back to top
Riki Wiki
Guest





PostPosted: Sun Apr 02, 2006 5:03 pm    Post subject: Re: Using COM objects in new threads Reply with quote



On 17 Mar 2006 02:50:50 -0800, Lion-O wrote:

Quote:
Any help will be appreciated.

Hoi

You need to repost your question on the Borland news server to make
everybody see it and possibly answer your question. Further, this newsgroup
do not officially exist, use newsgroup 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 WinAPI 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.