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;
标签:begin,CoUninitialize,end,MSXML,frm,installed,Microsoft From: https://www.cnblogs.com/cb168/p/17920256.html