Solved

Controlling NT Services via VB

Posted on 1998-10-25
1
165 Views
Last Modified: 2010-04-30
This question has been asked before, but I still can't find what I need...

I need to be able to see if a service has crashed and restart it from a VB program.  Our print quota software has a habit of crashing very often and I need an automated way to restart it.  Thanks!
0
Comment
Question by:joe3
1 Comment
 
LVL 1

Accepted Solution

by:
zivf earned 100 total points
ID: 1441542
use the following Win32API's (found in you know where):
QueryServiceStatus
SetServiceStatus
SetServiceBits
all found in the advapi32.dll as part of the new win32 functionality.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

760 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

16 Experts available now in Live!

Get 1:1 Help Now