Re: ServiceProcess.ServiceController.Start on remote machine - why synchronous?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello Chris,
You wrote in conference microsoft.public.dotnet.languages.vb on 5 Jul 2005 12:26:10 -0700:


CD> I don't know if it's a bug or not but you can call it asynchonously
CD> like this (check for typos):

CD> 'make a delegate to call our start sub
CD> Private Delegate Sub StartDelegate()

CD> 'Elsewhere
CD>         Dim s As New System.ServiceProcess.ServiceController
CD>         Dim sd As New StartDelegate(AddressOf s.Start)
CD>         Dim AsyncResult As IAsyncResult
CD>         AsyncResult = sd.BeginInvoke(Nothing, Nothing)

thanks, that worked!

Vadim

.