The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: rickszyr on June 23, 2009, 10:59:27 PM

Title: Service in masm
Post by: rickszyr on June 23, 2009, 10:59:27 PM
hi, could i get a few pointers on how to create a service, in MASM32?? i want to be able to execute a program, and leave it running in the background.
Title: Re: Service in masm
Post by: Slugsnack on June 23, 2009, 11:08:55 PM
perhaps you would benefit from looking up FourF's KMD tutorials
Title: Re: Service in masm
Post by: Mark Jones on June 23, 2009, 11:27:49 PM
A "service" can be quite a bit different than a program that just remains running. Are you wanting this to start automatically with windows, or only when the parent application is executed?
Title: Re: Service in masm
Post by: disintx on June 24, 2009, 12:02:42 AM
Iczelion's website/mirrors have links to how to create services in assembly.
Title: Re: Service in masm
Post by: ToutEnMasm on June 24, 2009, 05:50:36 AM

Here is a simple sample to start with


[attachment deleted by admin]
Title: Re: Service in masm
Post by: SteveCurtis on June 24, 2009, 06:23:20 AM
Quote from: rickszyr on June 23, 2009, 10:59:27 PM
hi, could i get a few pointers on how to create a service, in MASM32?? i want to be able to execute a program, and leave it running in the background.

Hi rickszyr,
Does it have to be a service?  Most of the hassle comes from registering the service and fulfilling the resuirements of the service control manager, of which there are legions of number of things to get right.

The Four F's stuff will get you started, but debugging either a service or device driver (similar issues) are significant.  You can load a simple service that does a little of this or that from the examples, but that is a LONG way from realising a useful program in my opinion. Unless you had a really good reason to do so, I would avoid either a service or a devide driver in windows it unless you are prepared for a heap of work.
If so you might like to read to begin.

"Undocumented NT" Prasad Dabak, Sandeep Phadke, Milind Borate
"Developing Windows NT Device Drivers- a Programmers Handbook" by Edward N. Dekker and Joseph M. Necomer

These weighty tomes go into sufficient detail about the SCM and the registry, plus the operating system boot up sequence in general, then how to install your driver/service should be come clearer. It is not for the faint hearted in my opinion.  I've written VXD's in W95 and this just takes the cake in WNT. It's another ball park altogether!!

Regards,
Steve



Regards,
Steve
Title: Re: Service in masm
Post by: Vortex on June 24, 2009, 09:09:00 AM
Services framework by hitchhikr (http://www.masm32.com/board/index.php?topic=1147.0)