This method is called by an IXmlReader when the reader has to resolve external entities. An application can provide an implementation of this interface to enable external entity resolution.
To return a resolved entity, the implementation can return ISequentialStream, IStream, or IXmlReaderInput through the pResolvedInput parameter. To create an instance of the IXmlReaderInput, you can use either CreateXmlReaderInputWithEncodingCodePage or CreateXmlReaderInputWithEncodingName.
This method is called every time an external entity is encountered.
By default, an IXmlReader has a resolver set to NULL. In this case, external entities are ignored—the reader simply replaces external entities with an empty string. However, if a resolver is set for a reader, the reader calls the ResolveUri method of that resolver for each external entity in the input.
The ResolveUri method can return one of the following combinations of results:
Note that the reader only accepts the success code S_OK. If the reader receives any other success code, the reader fails with E_FAIL.