Solved

Writing a Windows Service

Posted on 2004-04-14
9
165 Views
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...
0
Comment
Question by:maxell
  • 3
  • 2
9 Comments
 
LVL 14

Accepted Solution

by:
sudhakar_koundinya earned 63 total points
ID: 10830234
VB.net is easy to write Windows Service applications
have alook on following article
http://www.bipinjoshi.com/displayarticle.aspx?id=178
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 10830255
0
 
LVL 2

Expert Comment

by:cfry001
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,
like:
http://www.andreavb.com/vb_downloads.html

the file downloads as "6"
rename the file to 6.zip

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:
http://www.freevbcode.com/ShowCode.Asp?ID=4317
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 1

Assisted Solution

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

http://www.mentalis.org/apilist/RegisterServiceProcess.shtml
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 11257444
split points between sudhakar_koundinya,MatrixFreak,cfry001
0
 
LVL 1

Expert Comment

by:MatrixFreak
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.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA saving file message display 5 64
passing parameter in sql procedure 9 61
message box in access 4 46
Help me. 3 54
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

770 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