Solved

Writing a Windows Service

Posted on 2004-04-14
9
160 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now