F
fxh7622
Unregistered / Unconfirmed
GUEST, unregistred user!
scm := OpenSCManager(NIl, NIl, SC_MANAGER_ALL_ACCESS);<br> if scm <> 0 then<br> begin<br> svc := OpenService(scm, 'test', SERVICE_ALL_ACCESS);<br> if svc <> 0 then<br> begin<br> psTemp:=NIl;<br> if StartService(svc, 0, psTemp) then<br> begin<br> CloseServiceHandle(svc);<br> end;<br> end<br> else<br> begin<br> CloseServiceHandle(scm);<br> end;<br> end;<br><br>这里为什么StartService(svc, 0, psTemp) 总是返回FALSE呢???