Kod: Tümünü seç
procedure TForm1.btnInstallServiceClick(Sender: TObject);
var
SCM: SC_HANDLE;
ServiceHandle: SC_HANDLE;
dwStartType: DWord;
begin
dwStartType := 1;
SCM := OpenSCManager(nil, nil, SC_MANAGER_ALL_ACCESS);
if SCM = 0 then
raise Exception.Create('Servis Yöneticisi Açılamadı.');
ServiceHandle := CreateService(SCM, PChar('InterBaseServer'), PChar('InterBase'), SERVICE_CHANGE_CONFIG,
SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, PChar('c:\ib.exe'), nil, nil, nil, nil, nil);
if ServiceHandle = 0 then
begin
CloseServiceHandle(SCM);
raise Exception.Create('Servis Yükle Hatası: ' + SysErrorMessage(GetLastError));
end;
CloseServiceHandle(SCM);
CloseServiceHandle(ServiceHandle);
end;
Programın kapanmadan çalışmaya devam etmesi için ne yapmam gerekiyor?
Verdiği hata mesajı:
Kod: Tümünü seç
Project project1.exe raised exception class Exception with message 'Interbase Servisi Başlatılamadı.Hata:Hizmet belli aralıklarla
yapılan başlama veya denetim isteğine yanıt vermedi'.Procces stopped.Use Step or Run to continue.