VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



NT Service Control OCX UPDATED

by Sanx (10 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (6 Votes)

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

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

Rate NT Service Control OCX UPDATED

Download NT Service Control OCX UPDATED

Download NT Service Control OCX UPDATED (4 KB)

NT Service Control OCX UPDATED Comments

No comments have been posted about NT Service Control OCX UPDATED. Why not be the first to post a comment about NT Service Control OCX UPDATED.

Post your comment

Subject:
Message:
0/1000 characters