Load registry hive from C# fails

前端 未结 1 1370
伪装坚强ぢ
伪装坚强ぢ 2021-01-22 09:21

I am trying to load an off-line NTUSER.DAT file (and then modify it), but I cannot get this working. RegLoadKey returns 8589934592, which I have no idea what it means. This is

相关标签:
1条回答
  • 2021-01-22 10:00

    8589934592 is 0x200000000 which is more than 32 bits long.

    RegLoadKey returns a win32 "long" value, which is 32 bits. You've declared the function as returning a C# long which is 64 bits. If you fix the RegLoadKey declaration to return an int you'll get a value of 0 as expected.

    0 讨论(0)
提交回复
热议问题