nunopicado / Reusable-Objects

A set of reusable pre-made objects, which, like lego bricks, can be used and reused in several contexts and applications, independent of the problem domain.
GNU Lesser General Public License v3.0
12 stars 4 forks source link

RO.TXPath sometimes throws an EOleException #51

Closed nunopicado closed 6 years ago

nunopicado commented 6 years ago

This happens when using the object in a minimalist project. If (almost) any VCL or FMX units are in the project, no exception is raised

nunopicado commented 6 years ago

As stated by Remy Lebeau's answer in this post, MSXML is required to be initialized in order to use COM objects. Some VCL units do that for their own purposes, so when added to the project, they have the side effect of initializing COM, thus avoiding the problem in this RO.

The solution is to have TXPath itself initialize COM.