Вниз
Скачать: 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.026 c
1-1109837887
100а
2005-03-03 11:18
2005.03.20
ShellTreeView


14-1109263189
JaVa73
2005-02-24 19:39
2005.03.20
Мюзикл Moulin Rouge


3-1108812877
Борис
2005-02-19 14:34
2005.03.20
Выбор СУБД для БД на 1 млн. записей


1-1109758254
Pietro
2005-03-02 13:10
2005.03.20
как скопировать?


1-1110029514
Peter_cc
2005-03-05 16:31
2005.03.20
Служба!help!




   Наверх