Are you really trying to connect to a registry on a remote machine running WinXP Home Edition? If 'yes' then forget about it since the function to use is the one you mentioned, ::RegConnectRegistry, and will always fail on the Home Edition. What you perhaps can do is write an application that acts as a server that you can connect to using sockets and develop your own protocol for reading and/or writing the registry on the remote machine. If you are trying to read and/or write the local registry you should use ::RegOpenKeyEx or ::RegCreateKeyEx instead. However, in either case, depending on what access rights the user have running the application that desires access to the registry, the operation might fail due to lack of access rights. -- Roger