arkadaşlar merhaba,
sorunum web servisinden datayı çekerken program çok bekliyor , yada kilitleniyor.
thread ile yapmak istediğimde dom exception msxml not installed hatası alıyorum.
örnek kodum aşagıda...
procedure TMainForm.ExecuteButtonClick(Sender: TObject);
begin
TAsyncProgress<Boolean>.Execute(
function: Boolean
var data : ArrayOfPoliclinic;
begin
if ExceptionSwitch.IsChecked then
raise Exception.Create('Danger Will Robinson!');
Sleep(5000);
data := Service1.GetIService1(false,'',HTTPRIO1).GetPolList;
Result := True;
end,
procedure(AResult: Boolean)
begin
Inc(FCount);
ResultsMemo.Lines.Add(Format('Thread %d finished. Result=%s', [FCount, BoolToStr(AResult, True)]));
end,
procedure(AException: Exception)
begin
Inc(FCount);
ResultsMemo.Lines.Add(Format('Thread %d - %s:%s', [FCount, AException.ClassName, AException.Message]));
end);
end;
web servislerinde kilitlenme
Forum kuralları
Forum kurallarını okuyup, uyunuz!
Forum kurallarını okuyup, uyunuz!
Re: web servislerinde kilitlenme
TAsyncProgress bir thread başlatıyor ise; onun Execute metodunun içine ActiveX.pas içinde tanımlı olan; CoInitialize(nil) ve CoUnInitialize; kodlarını yazabilirsiniz.