Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
return values of xmlutil functions are not being consistent... #4899
I am trying to turn off ShowFilesInUse, however it looks like the return values of the xmlutil functions aren't being consistent.
From Jacob Hoover:
"Since no is the default value, it would make sense for it to not be written to the manifest.
If that documentation is correct...
That leads me to believe that XmlGetAttributeNumber is returning S_FALSE not E_NOTFOUND. In which case, it's turning on the files in use dialog because of the previous value being read in from the last option it found.
I sure hope I am reading the docs wrong, or this is a rather large and long standing bug.
This bug has existed since WIX 3.8, but if you would log it, we can bring it up for discussion in tomorrow's meeting.
The short term fix, if you can build Wix, is to change E_NOTFOUND to S_FALSE for anything that calls XmlGetAttribute inside of WixStdBA.
if (E_NOTFOUND == hr) <--- This compare.
i.e. short term solution for me:
if (S_FALSE == hr) <--- This compare.
ps actually the whole text of this bug was from Jacob :) (thank you sir)
There are 2 consumers of XmlGetNamedItem:
Looks like it's always returned S_FALSE for the XmlGetAttribute (and the methods that consume it), however I do have concerns with the following calls (note the WixStBA line numbers are wrong, as I am doing this check on my branch with local mods to WixStdBA):