If we wanted to implemented a SCM where would that reside? wineboot?
The SCM is the servies.exe program. Other programs using advapi32 communicates with it using RPC. I've started writing it - see http://www.winehq.org/pipermail/wine-patches/2007-September/044396.html . The problems with widl are fixed so it should be possible to add this code to Wine. Probably this code should be updated to current Wine and I'm not sure if I moved all the database query function to services.exe (it's good to more them all in one go to avoid discrepancies between the current advapi implementation that relies on the current state of registry keys and services.exe that loads all the keys at start time and keeps them in memory). I may have some time to work on it and I can help if someone who wants to do it (if one wants to have an idea how the SCM works there is a chapter about it in "Windows Internals" by M. Russinovich and D. Solomon).
Mikołaj Zalewski