Solved

Controlling NT Services via VB

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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.
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 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…

813 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

14 Experts available now in Live!

Get 1:1 Help Now