Re: singleton COM Service and FinalRelease()

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.
>


.



Relevant Pages

  • Re: multiple inheritance?
    ... spellchecker object, ... instantiate another one in code, now I have two spellchecker objects. ... private static $singleton = null; ... possibility of ambiguous methods of aggregated objects. ...
    (comp.lang.php)
  • Re: Privileges needed to instantiate COM objects
    ... I develop a webservice that, from time to time, needs to instantiate a ... The webservice is running under the default credentials (ASPNET / ... Default" button under "Launch and Activation Permissions". ... John Saunders | MVP - Windows Server System - Connected System Developer ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Reflection
    ... Now I have a need to instantiate any one of several business classes ... representing the form I want to launch. ... Each method required passing parameters to the constructor. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: More singleton objects in the same application
    ... SA and SB are local singleton objects that are being instantiated via remoting from remote clients. ... SMain is a local singleton that you intend to instantiate from SA or SB which are resident in the same Application Domain. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: __init__.py file
    ... Is it possible to instantiate such object in the ... Sounds more like a job for a singleton. ... Time flies like the wind. ... Stranger things have .0. ...
    (comp.lang.python)