title: RegLoadKey to a hive file from within a Shadow copy
body: <p>I'm creating a shadow copy and I want to mount a registry hive from that shadow copy using <code>RegLoadKey()</code> so I go over its content using the normal registry functions.<br>
  This usually works well except in certain machines where it doesn't work at all.</p>
  
  <p>I create the shadow copy and get its mount point - something like<br>
  <code>\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy8</code><br>
  I then call  </p>
  
  <pre><code>RegLoadKeyW(HKEY_LOCAL_MACHINE, "\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy8\Windows\System32\config\SOFTWARE", "mntpoint");
  </code></pre>
  
  <p>This call returns <code>1009 - The configuration registry database is corrupt.</code></p>
  
  <p>If I use <code>CreateFileW()</code> I can open this file successfully using that path so it is definitely there.</p>
  
  <p>I've made sure that the shadow copy is created with the registry writer so I don't think that's the issue.<br>
  There's no difference if I create the shadow copy and try this after a reboot.<br>
  This only happens on some machines. on most it works just fine. I'm not sure what differentiates the machines it doesn't work on.<br>
  The machine is a windows 2008 64-bit.</p>