I chose SHGetRegPathW from shlwapi, because that seemed to be the best matching function for getting the registry string. I did not call a *AW function directly. I fixed the SHQueryValueExW to convert the incoming strings to ascii, _because_ the SHQueryValueExAW function had a bug in handling ExpandEnviromentStringsA (always failed) and was ascii-only (it doesn't seem to handle unicode at all). That was also the part i was not completely happy about. I must say i'm not to happy about including shlwapi either, but i think it is better than reinventing the wheel.
I'm looking into the SHReg* functions at the moment and do a little cleanup i allready found some more glitches.
What would you suggest i do? Move SHGetRegPath into a libwine and make a dependency from shlwapi and compobj(ole32) to that library? reimplement SHGetRegPathW and SHQueryValueExW in place in compobj.c ? Especially with the lib seperation going on.. there will be more and more inter-dll dependencys, must we avoid that at all cost?
No, we must avoid such dependencys and reimplement this functionality where needed.
I send a patch in a few days.
juergen