MSXML COM-, CoInitialize/Ex() XML, COM COM- MSXML, IXMLDocument ( COM- , MSXML ). , , , COM- MSXML .
CoInitialize/Ex() , COM-, :
procedure My_Thread.Execute;
var
...
begin
CoInitialize(nil);
try
...
XMLDoc := LoadXMLData(str);
try
...
finally
// Since CoInitialize() and CoUninitialize() are being called in the same
// method as local COM interface variables, it is very important to release
// the COM interfaces before calling CoUninitialize(), do not just let them
// release automatically when they go out of scope, as that will be too late...
StartItemNode := nil;
ANode := nil;
XMLDoc := nil;
end;
...
finally
CoUninitialize;
end;
end;