A week ago, I blogged about how to register COM objects as LUA (http://blogs.msdn.com/jaredpar/archive/2005/05/17/418780.aspx). This is a follow up post, to show you how to alter your standard ATL registration code so that your DLL will register for the current user instead of for the machine.
This code uses the RegOverridePreDefKey() method to override HKCR with the registration point for the current user (HKCU\Software\Classes).
// DllRegisterServer - Adds entries to the system registry
"This posting is provided "AS IS" with no warranties, and confers no rights"