在VC下运行正常,但是为什么我转换成DELPHI以后就运行不起来呢?只有5分了!!!(5分)

  • 主题发起人 主题发起人 fxh7622
  • 开始时间 开始时间
F

fxh7622

Unregistered / Unconfirmed
GUEST, unregistred user!
scm := OpenSCManager(NIl, NIl, SC_MANAGER_ALL_ACCESS);<br>&nbsp; if scm &lt;&gt; 0 then<br>&nbsp; begin<br>&nbsp; &nbsp; svc := OpenService(scm, 'test', SERVICE_ALL_ACCESS);<br>&nbsp; &nbsp; if svc &lt;&gt; 0 then<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; psTemp:=NIl;<br>&nbsp; &nbsp; &nbsp; if StartService(svc, 0, psTemp) then<br>&nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; CloseServiceHandle(svc);<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; end<br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; CloseServiceHandle(scm);<br>&nbsp; &nbsp; end;<br>&nbsp; end;<br><br>这里为什么StartService(svc, 0, psTemp) 总是返回FALSE呢???
 
你有那个服务吗?<br>
 
当然由了!!!
 
那就不知道了
 
后退
顶部