views:

64

answers:

1

I'm doing some work with registry hives, and I need to know if the file the user supplies the program with really is a registry hive. Short of attempting to mount it, how can I tell if the file really is a registry hive?

+1  A: 

Interesting question, upon digging around, there is a call that is part of the Offline Registry Library that will attempt to validate the hive and report back whether it was successful or not, but it's part of Win32/COM

OROpenHive

Sounds like what you want to do, just no direct .NET implementation of it

curtisk
pinvoke is fine. Thank you. :)
Malfist