
Question about ATL services, where to put user code
I'd recommend a book here:
"Professional NT Services" by Kevin Miller, Wrox Press
Just a note, ATL COM services are for hosting COM objects - servers.
You are talking about client-side code. Are you sure you want a
service? Even if you do, a service created with ATL is designed to
host COM objects. If you need a general purpose NT service, you
are better off not using the ATL appwizard... The book should
clear this up for you.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
Quote:
> I'm new to ATL services, or even NT Services in general. Just playing at
> this point.
> I went through the ATL Appwizard and created a basic service, and now I'm
> trying to figure out how to make it load up a COM component from a DLL,
> retrieve an interface pointer and call a method on it. Is the ideal place
> for doing something like this in the CServiceModule's Run() method?
> Start(), perhaps? Like I said, I'm new at this
> Maybe in the Handler() function, but from what I see in there it looks like
> it's designed for handling Service Control messages and that I shouldn't use
> it myself.
> Likewise, I would like to shut the server down after I successfully call my
> method, and wondered if I should somehow try to post a SERVICE_CONTROL_STOP
> message?
> I'm sure these are all basic questions, and all I'm interested in doing at
> this point is some pretty basic ATL service programming, so if there are any
> quick tutorials on the web that might help me, that would be great.
> Gracias..
> Robert ("Buckminster") Gambles