Microsoft MSXML is not installed.

线程里边加上CoInitializeEx和CoUninitialize就好了,线程外边不起作用。

procedure   TFrmManager.testinputpwd;
begin
CoInitializeEx(Nil, COINIT_MULTITHREADED);
   var frm:=TFrmKPYBpwinput.Create(nil);
  frm.showmodal;
  frm.Free;
  CoUninitialize();
end;
procedure TFrm.ToolButton15Click(Sender: TObject);
begin
TThread.CreateAnonymousThread(testinputpwd).Start;
end;

 

TThread.CreateAnonymousThread(
procedure
begin
  CoInitializeEx(Nil, COINIT_MULTITHREADED);
  var frm:=TFrmKPYBpwinput.Create(nil);
  frm.showmodal;
  CoUninitialize();
end
).start;

 

posted on 2023-12-21 22:18  lypzxy  阅读(110)  评论(0编辑  收藏  举报