Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.03.20;
Скачать: 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 вся ветка

Текущий архив: 2005.03.20;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.045 c
1-1110189703
Хинт
2005-03-07 13:01
2005.03.20
Преобразование имени файла


3-1108708207
Ольга
2005-02-18 09:30
2005.03.20
UPDATE с углубленным сравнением


3-1108631800
AndrewKsionz
2005-02-17 12:16
2005.03.20
Как поместить картинку jpeg в Graphic-поле


14-1109487131
begin...end
2005-02-27 09:52
2005.03.20
С Днём рождения! 27 февраля


3-1108557114
Arazel
2005-02-16 15:31
2005.03.20
Как показать на DELPHI связаную таблицу?