http://bugs.winehq.org/show_bug.cgi?id=22020
--- Comment #12 from Nikolay Sivov bunglehead@gmail.com 2010-03-13 13:54:57 --- (In reply to comment #10)
As said, I'm by no means an expert but googling for 'loadXML' shows several examples with 'normal' strings. This could of course also mean that loadXML figures out whether it's passed a BSTR of WCHAR.
This most likely means that it doesn't use length stored if ptr-- position. Actually I don't think we should use it either, cause it's safe to pass -1 to WideCharToMultiByte cause BSTR are always null terminated. WideCharToMultiByte needs a full string scan for both calls so I don't think we are going to have a speed change after that.