Writing a Windows Service

Posted on 2004-04-14
Last Modified: 2010-05-02
I was asked to write a Service for windows XP.  The reason it needs to be a service is because it needs to be running weather or not there is someone loged on the computer (it is never off).  I need it to "watch" an audio input, and when there is audio there, record into a dated file, save it, and reset itself when the audio stops.  I am pretty profecient at VB (havn't done it in a year, but am confident about my abilities).  I need to know what special conciderations I need regarding how to set this up, and how to incorporate it into the windows system.  This is for our dispatch records for my Vol. Fire company, so it needs to be reliable.  Any tips or sugestion would be greatly apreciated. Thanks in advance, Anthony...
Question by:maxell
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 14

Accepted Solution

sudhakar_koundinya earned 63 total points
ID: 10830234 is easy to write Windows Service applications
have alook on following article
LVL 14

Expert Comment

ID: 10830255

Expert Comment

ID: 10830508
If you are going to use VB6, there are 2 options:

1) use NTSVC.ocx from an old MSDN CD (search under NTSRVOCX), there are plenty of examples of how to do this,

the file downloads as "6"
rename the file to

which actually includes the ocx and some batch files for installing/uninstalling

I have done this on windows 2000, should work on XP too.

2) here is a "pure VB" solution:
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.


Assisted Solution

MatrixFreak earned 62 total points
ID: 10843531
AllAPI.NET provides some example source code on how to make your program a service.
LVL 14

Expert Comment

ID: 11257444
split points between sudhakar_koundinya,MatrixFreak,cfry001

Expert Comment

ID: 11416951
Actually, i think my link is only for Windows 95 and below and would not work in Windows XP.  I think it should go to sudhakar_koundinya and cfry001.

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question