CreateXmlReaderInputWithEncodingName (Compact 7)
3/12/2014
This function creates an instance of IXmlReaderInput with the provided parameters.
Syntax
HRESULT CreateXmlReaderInputWithEncodingName (
IStream* pInputStream,
IMalloc* pMalloc,
const WCHAR* pwszEncodingName,
BOOL fEncodingHint,
const WCHAR* pwszBaseUri,
IXmlReaderInput** ppInput
);
Arguments
pInputStream
[in] A pointer to the input stream for the reader to read the data from. This can be either an ISequentialStream or an IStream interface. We recommend that the IStream interface be implemented for the stream even if some of its methods would return E_NOTIMPL. We also recommend that the stat method be implemented so that the size of the stream can be queried, because this can result in better performance.This parameter cannot be NULL.
- pMalloc
[in] A pointer to a user-provided implementation of the IMalloc interface. The reader will use this for all memory allocation. If this parameter is NULL, the reader will use its own implementation.
- pwszEncodingName
[in] Specifies the encoding of the input. The user can specify the encoding as a name of the encoding. The actual behavior of the reader depends on the fEncodingHint flag.
- fEncodingHint
[in] If TRUE, the parser will try to use the encoding specified in pwszEncodingName. If the encoding of the file differs from that specified in pwszEncodingName, the parser will try to determine the encoding. If FALSE, the parser must use the encoding specified in pwszEncodingName. Any other encoding results in an error.
- pwszBaseUri
[in] The base URI for this input stream. This value is passed to ResolveUri when XmlLite is resolving external entities.
- ppInput
[out] The new IXmlReaderInput. This parameter cannot be NULL.
Return Value
This function returns S_OK if no error is generated.
See Also
Reference
Functions
IXmlReaderInput
ISequentialStream
IStream
IMalloc
ResolveUri
IXmlReaderInput
Error Codes