Вниз
Скачать: CL | DM;

EnumServicesStatus   Найти похожие ветки 

← →
MetalFan ©   (2005-02-08 12:26) [0]

как пользоваться subj? сделал так, но что-то не работает:
function GetSystemServiceList(
 AList: TStringList): Boolean;
const
 SizeBuf = 4096;
var
 ServList: array[0..SizeBuf-1] of TEnumServiceStatus;
 Size,
 Needed,
 Return,
 Handle: Cardinal;
 i: Integer;
begin
 Result := Assigned(AList) and InitSCManager;
 if not Result then Exit;
 Size := SizeOf(ServList);
 Result := EnumServicesStatus( FSCManagerHandle,
                     SERVICE_WIN32,
                     SERVICE_ACTIVE,
                     ServList[0],
                     Size,
                     Needed,
                     Return,
                     Handle);
 if not Result then Exit;
 AList.Clear;
 for i := 0 to pred( Return ) do
   AList.Add( ServList[i].lpServiceName );
end;

соотв InitSCManager инициирует SCManager


← →
Reindeer Moss Eater ©   (2005-02-08 12:30) [1]

GetLastError знает всю правду


← →
MetalFan ©   (2005-02-08 12:30) [2]

sorry! сам рязобрался! надо было Needed, Return и Handle обнулить перед вызовом!
все, всем спасибо за внимание)



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.023 c
3-1108932186
VitGun
2005-02-20 23:43
2005.03.20
Формы Excel -> FastReport


14-1109414052
07BB:080Dh
2005-02-26 13:34
2005.03.20
Пневматический автомат Калашникова


6-1105978696
CBOLOCH
2005-01-17 19:18
2005.03.20
Отловить новую сессию


1-1109827376
leonidus
2005-03-03 08:22
2005.03.20
Глюки MainMenu в XP


1-1110299907
ser35
2005-03-08 19:38
2005.03.20
Как отобразить словами выбранную дату из календаря




   Наверх