I have only ever created COM objects using the CoCreateInstance.
e.g.
OleCheck( CoCreateInstance( CLASS_ObjectLoader, nil, CLSCTX_ALL, IID_IObjectLoader,
Result ));
As to which thread it is created on Depends on the nature of your own thread and its
registry settings.
If both are marked as apartment threaded, I would expect it to be created in the same
thread - even if it was not, you should not be able to notice the difference as COM
would marshal out your parameters to the components own thread and then
marshal/unmarshal back the result - this assumes that all your parameters/types can be
automatically marshalled - see the Delphi help file for those types that can be
marshalled eg Integer, WideString.
A bit strange that it hangs. If you have any problems normally only get the OLE
Catastrophic excpetions.
What I have done in this situation is to write my own test harness using Delphi and
CoCreateInstance to simulate loading etc. Can then test and debug this before using
under ASP.
Myles.
-----Original Message-----
From: Neil Anderson [SMTP:[EMAIL PROTECTED]]
Sent: Tuesday, July 20, 1999 9:52 AM
To: Multiple recipients of list delphi
Subject: [DUG]: Calling ocx from ASP com object
Hi
I am using a 3rd party non visual ActiveX component(OCX) in a COM object I
have developed for use with ASP.
The problem I have is that if I run two instances simultaneously my COM
objects hang.
My COM object is apartment threaded and the OCX registry setting indicate
that the OCX is also apartment threaded.
After importing the ActiveX control into Delphi I create the ActiveX
component using the standard Totherocx.Create(nil),
does the OCX component I create run in the same thread as my base com object
?
I am currently using the ActiveX component in a standard Delphi application
and I can have two or more instances running concurrently, so I think the
OCX is ok.
Can anyone offer suggestions as to what I may be doing wrong ?
Thanks Neil
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
application/ms-tnef