backup

  • Thread starter Thread starter dinesh krishna via DotNetMonster.com
  • Start date Start date
D

dinesh krishna via DotNetMonster.com

I had used the following code for taking registry back up.

[DllImport("advapi32.dll", EntryPoint="RegSaveKey")] public static extern int RegSaveKey(IntPtr hKey, string lpFile, int lpSecurityAttributes);

IntPtr user = new IntPtr((int)RegistryHive.CurrentUser);

RegSaveKey(user, @"C:\regbackup.reg", 0);

the file is creating.but it is zero byte.what is the problem with this
programe.
if any one know please elp me
 
Did you check the value returned by this API?

Willy.
 
I had checked the value returned.but stil th eproblem exists.can send me
the code.
Thanks and Regards
dinesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top