03-03-2008, 03:43 PM
Don't know, I have only 2003 without SP, and the code works well.
Try this.
Try this.
out
int scm=OpenSCManager(0 0 SC_MANAGER_ENUMERATE_SERVICE)
if(!scm) end _s.dllerror
int i n ne=64*1024/sizeof(ENUM_SERVICE_STATUS)
ARRAY(ENUM_SERVICE_STATUS) a.create(ne)
if(!EnumServicesStatus(scm SERVICE_WIN32 SERVICE_STATE_ALL &a[0] ne*sizeof(ENUM_SERVICE_STATUS) &i &n 0))
,CloseServiceHandle scm
,end _s.dllerror
for i 0 n
,out a[i].lpDisplayName
CloseServiceHandle scm