How to extract the current state of the registry? (in C/C++, XP)
I was wondering how one might extract the current state of the registry, of Windows XP, i开发者_运维问答n C or C++? (While the OS is active).
I been trying to use BackupRead() on the registry-files, but it is impossible to CreateFile() them. I managed to create a Shadow Copy of the registry-files, but it wasn't the current state of the registry.
Would appreciate any hint... (I know ERUNT is able to do it)
Thanks, Doori Bar
RegSaveKey used to be the preferred method, but the documentation now states that you should use the Volume Shadow Copy Service. I think RegSaveKey should continue to work, though (assuming you have the required privileges). Of course you could always roll your own implementation as is demonstrated in the link in one of the other answers.
精彩评论