Well the problem I'm trying to solve is this. My COM object, the dll COM
object is actually based on a system that we are provided with. The runtime
system for this, while it supports multithreading within its own environment
that we use, is actually not a true multithreaded windows application. So
if you create multiple instances of an object and they are both running at
the same time and hosted by the same process, one will get blocked until
the other one finishes running. This also means that the process gets bound
to a particular CPU on a multi-cpu system thus negating the benefit of
multiple CPU's. So to get around this, I created a cover ActiveX COM EXE
that simply creates an instance of my COM dll and returns it. That means
that each instance of my COM dll is hosted in its own ActiveX COM EXE and
gets its own runtime environment and doesn't have to wait for anybody and is
free to run on any CPU available.
So, I'm trying to duplicate this behavior with Component Services.
Basically I would like to have Component Services create a new dllhost.exe
each time I create an instance of my COM dll object.
I actually think I have discovered how to do this. In the properties for my
server object in Component Services, on the Pooling & Recycling tab, if I
set the Pool Size to its maximum of 999,999 - got the value from the MS
website and others, each time and object creation request comes in,
Component Services will create a new dllhost.exe to host that object until
this number is reached. Since I don't ever anticipate have 999,999 objects
going at any one time I think this might just be what I'm looking for.
Is this what you found out also ?
Nick
[quoted text, click to view] "Olivier Matrot" <olivier.matrot@online.nospam> wrote in message
news:eN4HBbKTFHA.2560@TK2MSFTNGP09.phx.gbl...
> Is your goal is to serialize access to your COM object because it is
> Apartment threaded, hosting a service component that calls your COM object
> in COM+ is one solution. I've had the same problem.
>
> "Nick Palmer" <nick@kcicorp.com> wrote in message
> news:1172q1q3qt1c365@corp.supernews.com...
> > Hi all,
> >
> > I have a COM object (a dll) and unfortunately for me, this object is
> > single
> > threaded and I have no way to change this behavior. What I currently do
> > is
> > host this COM object (the dll) in a ActiveX EXE COM object. So
everytime
> > I
> > need a new instance of the dll COM object, I create a instance of the
> > ActiveX EXE COM object and this creates an instance of the COM dll
object
> > and returns it. So this way I have a single host for each dll COM
object
> > and I don't have to deal with single threading in the COM dll.
> >
> > Now, I would like to get away from this way of doing things, and I was
> > wondering if Component services would provide similar functionality.
I've
> > done some testing with Component services and so far like what I have
> > seen.
> > I created a Server componnent, and then added my COM dll. Now, when I
> > create an instance of my COM dll I can see a dllhost.exe app gets
created
> > that is the host for my COM dll. But now, if I launch a second copy of
my
> > testing program , and I create another instance of my COM dll, I do not
> > get
> > an additional dllhost.exe program. So I'm assuming that both instances
of
> > my COM dll are being hosted by the same dllhost.exe. This is the
behavior
> > that I was trying to avoid. So, is it possible to have Component
Services
> > create a new host app (dllhost.exe) each time I create a new instance of
> > my
> > COM dll ?
> >
> > Thanks in advance,
> > Nick
> >
> >
>
>