Solved

Controlling NT Services via VB

Posted on 1998-10-25
1
169 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

Independent Software Vendors: 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!

Question has a verified solution.

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

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

733 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