/[cvs]/joko/TestArea/vb/NtServices/ServiceControl/PauseService.bas
ViewVC logotype

Contents of /joko/TestArea/vb/NtServices/ServiceControl/PauseService.bas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Mon Jan 20 17:34:54 2003 UTC (21 years, 10 months ago) by joko
Branch: MAIN
CVS Tags: HEAD
+ initial check-in

1 ' 2001-12-09
2
3 Public Function PauseService(ServiceName As String) As Boolean
4
5 Dim oSysInfo As New ActiveDs.WinNTSystemInfo
6 Dim oComp As ActiveDs.IADsComputer
7 Dim oSvcOp As ActiveDs.IADsServiceOperations
8 Dim sCompName As String
9 Dim sSvc As String
10 Dim lRet As Boolean
11
12 On Error GoTo errorhandler:
13
14 sSvc = ServiceName
15
16 sCompName = "WinNT://" & _
17 oSysInfo.ComputerName & ",computer"
18
19 Set oComp = GetObject(sCompName)
20 Set oSvcOp = oComp.GetObject("Service", sSvc)
21 oSvcOp.Pause
22 PauseService = True
23 Exit Function
24 errorhandler:
25 PauseService = False
26 End Function

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed