Jim McCoy wrote:
Yes, this can be a problem. It's not strictly necessary of course to run as a service. The process could just ensure that once it starts it stays around. Then you'd have a question of when the process should go out of scope. In any case the key thing is to make sure that that class object stays registered with the SCM so it can be re-used. Then the class object itself needs to return the same object. It may be easier to have 2 different objects. One COM object would be the 'factory' object that would return a reference to the singleton class. Or, perhaps you're already doing this. That way you can control the creation of the singleton object in your own code.Argh! Well, it turns out that the real problem was that when creating a mutex for a module-level singleton you should not store a ref to the handle in an instance that might find itself getting popped. Assign to a class variable that will stick. D'oh!
I will take a look at setting up the COM object as a service. One
question that pops up is whether such a service would run "as the
local user"? We use the COM service as an authentication bridge
between an agent service that is always running in the background (but
runs as the admin) and various users on the system. Hmmm, something
to check out.
-- Jens B. Jorgensen [EMAIL PROTECTED]
"With a focused commitment to our clients and our people, we deliver value through customized technology solutions"
smime.p7s
Description: S/MIME Cryptographic Signature_______________________________________________ Python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32
