在VB.net我可以執行在Windows的服務自定義命令:ExecuteCommand到.NET服務
桌面:
Const SmartShutdown As Integer = 12
Dim myService As New ServiceController("SampleService")
myService.ExecuteCommand(SmartShutdown)
Windows的服務:
Protected Overrides Sub OnCustomCommand(ByVal command As Integer)
是它也可以執行從VB6到.net Windows服務的命令?
還有一種方法可以執行自定義命令嗎?我的服務使用共享DLL來管理工具。當我安裝新版本的主程序時,如果有任何Tools正在運行,我的安裝程序(用vb6編寫)應該檢查。 – joau
@joau是的,你可以看到我的更新。 –