Type = 选择 (单选框1.选中, 11, 48)
hSC = OpenSCManager (0, 0, 131101)
.如果真 (hSC = 0)
信息框 (“无法获取足够的权限”, 16, )
返回 ()
.如果真结束
EnumServicesStatus (hSC, Type, 3, ServiceBin, 0, BytesNeeded, ServicesReturned, Handle)
ServiceBin = 取空白字节集 (BytesNeeded)
EnumServicesStatus (hSC, Type, 3, ServiceBin, BytesNeeded, BytesNeeded, ServicesReturned, Handle)
.计次循环首 (ServicesReturned, N)
RtlMoveMemory (Service, 取字节集中间 (ServiceBin, N × 36 - 35, 36), 36)
Item = 超级列表框1.插入表项 (, , , , , )
超级列表框1.置标题 (Item, 0, Service.lpServiceName)
超级列表框1.置图片 (Item, 0, 4)
超级列表框1.置标题 (Item, 1, Service.lpDisplayName)
超级列表框1.置图片 (Item, 1, 4)
超级列表框1.置标题 (Item, 2, 取文本注册项 (4, “SYSTEM\CurrentControlSet\Services\” + Service.lpServiceName + “\Description”, ))
超级列表框1.置图片 (Item, 2, 3)
超级列表框1.置标题 (Item, 3, Type (Service.dwServiceType))
超级列表框1.置标题 (Item, 4, State (Service.dwCurrentState))
超级列表框1.置标题 (Item, 5, StartState (取数值注册项 (4, “SYSTEM\CurrentControlSet\Services\” + Service.lpServiceName + “\Start”, )))
超级列表框1.置标题 (Item, 6, Login (到大写 (取文本注册项 (4, “SYSTEM\CurrentControlSet\Services\” + Service.lpServiceName + “\ObjectName”, ))))
.计次循环尾 ()
CloseServiceHandle (hSC)