?
Solved

Writing a Windows Service

Posted on 2004-04-14
9
Medium Priority
?
179 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
[X]
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
9 Comments
 
LVL 14

Accepted Solution

by:
sudhakar_koundinya earned 252 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Assisted Solution

by:MatrixFreak
MatrixFreak earned 248 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Suggested Courses

801 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