This commit is contained in:
Digital Data - Marlon Schreiber
2018-10-04 12:26:11 +02:00
parent 77864646a7
commit eecaea85f3
3 changed files with 46 additions and 34 deletions

View File

@@ -130,34 +130,34 @@ Public Class ClassWindream_allgemein
End Function
Public Function Start_WMCC_andCo()
Try
If WMSESSION_STARTSTOP_STARTUP = True Then
ClassLogger.Add(">> WINDREAM-Start on ApplicationStart is active!", False)
If WMSESSION_STARTSTOP_STARTUP = True Then
Try
Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter")
Dim owindreamIndexService = CreateObject("WMIndexServer.WMIdxSvControl")
owindreamControlCenter.StartVFSService(1)
System.Threading.Thread.Sleep(1000)
owindreamIndexService.Start()
System.Threading.Thread.Sleep(1500)
Create_Session()
Catch ex As Exception
ClassLogger.Add("Error while starting up WMCC and IndexService: " & ex.Message, True)
End Try
End If
End If
Create_Session()
Catch ex As Exception
ClassLogger.Add("Error while starting up WMCC and IndexService: " & ex.Message, True)
End Try
End Function
Public Function Stop_WMCC_andCo()
If WMSESSION_STARTSTOP_STARTUP = True Then
Try
Try
If WMSESSION_STARTSTOP_STARTUP = True Then
Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter")
Dim owindreamIndexService = CreateObject("WMIndexServer.WMIdxSvControl")
owindreamControlCenter.StartVFSService(0)
owindreamIndexService.Shutdown()
owindreamControlCenter.ExitCC(0)
Catch ex As Exception
ClassLogger.Add("Error while Stopping WMCC and IndexService: " & ex.Message, True)
End Try
End If
owindreamControlCenter.StartVFSService(0)
owindreamIndexService.Shutdown()
owindreamControlCenter.ExitCC(0)
End If
Catch ex As Exception
ClassLogger.Add("Error while Stopping WMCC and IndexService: " & ex.Message, True)
End Try
End Function
#End Region