Results 1 to 2 of 2

Thread: Program to start a service on W2k

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2001
    Location
    Eugene, Oregon
    Posts
    41

    Exclamation Program to start a service on W2k

    Any one know how to start and stop a service with Visual Basic? Using windows 2000 server.

    Thanks.
    Last edited by dhansen; Sep 13th, 2001 at 11:29 AM.

  2. #2
    Mad_Phil
    Guest
    Below is a list of API's that I have, unfortunatly I can't seem to find the program that I put them in ??? It must be somewhere on the hard disk. But anyway you could try searching msdn for them. If you have no luck I can search harder for the program if you want.

    Declare Function OpenService Lib "advapi32.dll" Alias "OpenServiceA" (ByVal hSCManager As Long, ByVal lpServiceName As String, ByVal dwDesiredAccess As Long) As Long

    Declare Function StartService Lib "advapi32.dll" Alias "StartServiceA" (ByVal hService As Long, ByVal dwNumServiceArgs As Long, ByVal lpServiceArgVectors As Long) As Long

    Declare Function CloseServiceHandle Lib "advapi32.dll" (ByVal hSCObject As Long) As Long

    Declare Function ControlService Lib "advapi32.dll" (ByVal hService As Long, ByVal dwControl As Long, lpServiceStatus As SERVICE_STATUS) As Long

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width