How can I programmatically inspect and manipulate a registry hive file without mounting it?

(Raymond Chen) Say you have a registry hive file. One way to inspect and manipulate its contents is by calling the Reg­Load­Key function to mount it in the registry and then use the normal registry operations.