Hi,
I'm currently converting a vb application into c# service. I looked at the staring point for this appliaction which is form load event. This form load event has the following code:
Private Sub Form_Load()
Select Case UCase(Command)
Case "-I", "/I"
If NTService.Install Then
MsgBox NTService.DisplayName & _
" installed successfully."
Else
MsgBox NTService.DisplayName & _
" did not install successfully."
End If
End
Case "-U", "/U"
If NTService.Uninstall Then
MsgBox NTService.DisplayName & _
" uninstalled successfully."
Else
MsgBox NTService.DisplayName & _
" did not uninstall successfully."
End If
End
Case "-DEBUG"
'call start up
Main
Case ""
'-- This code should only run when the
' application is started without parameters
NTService.StartService
Case Else
'-- This code should only run when the
' application is started with invalid
' parameters
MsgBox "The parameter: " & Command & " was is not understood." & vbCrLf & "Try -I (install) or -U (uninstall)."
End
End Select
End Sub
As things standing at the moment I don't know what this programm is trying do? Can some body explain to me please. The command line argument was set to "-DEBUG"
Specifically if the command line is "-DEBUG", then the procedure name Main is called.