Search Tools Links Login

NT Service Control OCX **UPDATED**


**UPDATED** A small OCX that can be used to Stop, Start, Pause, Resume, query the current state and change the start type of any Windows NT Service. Works on NT4, 2000 and XP.

Original Author: Sanx

API Declarations

Declare Function OpenSCManager Lib "advapi32.dll" Alias "OpenSCManagerA" (ByVal strMachineName As String, ByVal strDBName As String, ByVal lAccessReq As Long) As Long
Declare Function OpenService Lib "advapi32.dll" Alias "OpenServiceA" (ByVal hSCManager As Long, ByVal strServiceName As String, ByVal lAccessReq As Long) As Long
Declare Function StartService Lib "advapi32.dll" Alias "StartServiceA" (ByVal hService As Long, ByVal lNumServiceArgs As Long, ByVal strArgs As String) As Boolean
Declare Function ControlService Lib "advapi32.dll" (ByVal hService As Long, ByVal lControlCode As Long, lpServiceStatus As SERVICE_STATUS) As Boolean
Declare Function CloseServiceHandle Lib "advapi32.dll" (ByVal hHandle As Long) As Boolean
Declare Function QueryServiceStatus Lib "advapi32.dll" (ByVal hService As Long, lpServiceStatus As SERVICE_STATUS) As Boolean

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 67 times

Categories

Visual Basic 6

Attachments

NT_Service4251412162001.zip
Posted: 9/3/2020 3:45:00 PM
Size: 4,369 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.