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;