Re: Works now ... Re: How to start service programmatically ?
From: thatsalok (thatsalok_at_NO_gmail.com_I_DONT_NEED_SPAM)
Date: 03/30/05
- Next message: Eitan: "doing backup"
- Previous message: David H. Lipman: "Re: ADSL Internet Sharing + Lan"
- In reply to: Polaris: "Works now ... Re: How to start service programmatically ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 30 Mar 2005 10:19:43 +0530
Are you creating service every time before starting!!!!!, better use
OpenService(...) api to get valid handle of service then pass it on
StartService(...) api.
-- With Regards Alok Gupta Visit me at http://alok.bizhat.com "I Believe this will Help" "Polaris" <etpolaris@hotmail.com> wrote in message news:#dxHhmJNFHA.1176@TK2MSFTNGP12.phx.gbl... > Hi: > I tried the code again and it worked! I do not know why, the only thing I > can think of is that I rebooted the machine and that might re-set the > service control manager. > > Thanks > Polaris > > "thatsalok" <thatsalok@NO_gmail.com_I_DONT_NEED_SPAM> wrote in message > news:ehfDPrCNFHA.1436@TK2MSFTNGP10.phx.gbl... > > Could you post little Code snippet ,describing extactly how are using > > StartService(...) api? > > Have you tried taking valid HANDLE form OpenSCManager(...) with all > > access. > > > > > > -- > > > > With Regards > > Alok Gupta > > Visit me at http://alok.bizhat.com > > > > "I Believe this will Help" > > > > > > "Polaris" <etpolaris@hotmail.com> wrote in message > > news:uRAwTcCNFHA.2252@TK2MSFTNGP15.phx.gbl... > >> Hi: > >> > >> I wrote a service program on XP. The service can be started manually in > > the > >> Control Panel - Service program, but I could not start it > > programmatically; > >> call to StartService() returns Error message saying could not connect to > > the > >> Service Control Manager. > >> > >> Appreciate any hits from you! > >> > >> Thanks in Advance > >> Polaris > >> > >> > > > > > >
- Next message: Eitan: "doing backup"
- Previous message: David H. Lipman: "Re: ADSL Internet Sharing + Lan"
- In reply to: Polaris: "Works now ... Re: How to start service programmatically ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|