Re: singleton COM Service and FinalRelease()
- From: "Alexander Nickolov" <agnickolov@xxxxxxxx>
- Date: Thu, 6 Oct 2005 09:24:09 -0700
Hmm, how can I put it more bluntly - _do_not_ use the
default setting of Launching User!
Now as for your original question. Do not use a singleton
COM object in your service. Use a regular COM object
instead. Use an internal C++ singleton that you instantiate
when the first COM object is instantiated and destroy it
when your last COM object is released. Even though your
service continues to run, the object holding your TCP
connection will be destroyed.
--
=====================================
Alexander Nickolov
Microsoft ex-MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
<cmbardon@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:1128599923.439824.137210@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Brian, your suggestion definitely makes sense, and that's what I tried
> initially, but I still got the ACCESSDENIED error on CoCreateInstance.
> In DCOMCNFG, I set the Authentication level to None, the access,
> launch, and config permissions to everyone, and the identity as the
> launching user. Even with the LocalSystem account having launch
> access, it still wasn't able to create a COM instance. Only when the
> identity of the COM object and the Telephony service matched could I
> access the COM object from my TSP. Since there seems to be no way to
> get a COM object to use the LocalSystem identity, I'm investigating
> using the COM object as a service.
>
.
- References:
- singleton COM Service and FinalRelease()
- From: cmbardon
- Re: singleton COM Service and FinalRelease()
- From: Igor Tandetnik
- Re: singleton COM Service and FinalRelease()
- From: cmbardon
- Re: singleton COM Service and FinalRelease()
- From: Igor Tandetnik
- Re: singleton COM Service and FinalRelease()
- From: cmbardon
- Re: singleton COM Service and FinalRelease()
- From: Brian Muth
- Re: singleton COM Service and FinalRelease()
- From: cmbardon
- singleton COM Service and FinalRelease()
- Prev by Date: Re: singleton COM Service and FinalRelease()
- Next by Date: Re: Marshalling a SAFEARRAY of custom interface types
- Previous by thread: Re: singleton COM Service and FinalRelease()
- Next by thread: Re: singleton COM Service and FinalRelease()
- Index(es):
Relevant Pages
|