http://bugs.winehq.org/show_bug.cgi?id=14509
--- Comment #4 from Mathias Kosch info@mkosch.de 2008-07-19 15:34:27 --- Sorry, I noticed that my previous mistake is still visible here. This bug is related to "dwFlags" containing (lot less than) "RRF_RT_ALL". Only the Bits (RRF_RT_REG_EXPAND_SZ | RRF_RT_REG_SZ) also lead to an error return value under Windows.
I don't post the new patch since I already posted it to the mailing list.