NT Service and COM

Duncan Booth duncan at NOSPAMrcp.co.uk
Mon Jun 25 03:47:19 EDT 2001


Jeff Shannon <jeff at ccvcorp.com> wrote in
news:3B3374C8.D3EA315B at ccvcorp.com: 

> 
> 
> Syver Enstad wrote:
> 
>> Yes, but that ain't doesn't expose no COM server. If you ever find out
>> Duncan I'd be really pleased to hear what you've figured out. I've
>> only come so far as to look at the .py file that implements local
>> servers for python. Take a look at win32com.server.localserver.py to
>> see how vanilla pythoncom objects are exposed like a localserver. 
> 
> What would probably work best, is writing the COM server, then writing
> a Service that creates and makes use of the COMserver...  though of
> course this depends on your exact requirements.  I wouldn't *think*
> that there's any special tricks to combining these.  Just have your
> SvcDoRun()  instantiate the COM object before moving into its main
> loop.... 

I don't actually want the service to use the COMserver, just to make an 
object available to processes outside the service so that they can 
communicate with it. This involves setting some extra registry keys, and 
putting the loop from localserver.py into SvcDoRun, or into another thread 
created for the purpose within the service.



-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?



More information about the Python-list mailing list