Understanding Why RegSaveKey Fails

ID: Q154806

4.00    | 3.51 4.00
WINDOWS | WINDOWS NT kbprg kbhowto

The information in this article applies to:

SUMMARY

The RegSaveKey API can be used to save a registry key and all of its subkeys to a specified file. The API creates the file in the following manner depending upon which operating system it is running on:

   ----------------------------------------------------------------------
   |                  |    WINDOWS 95           |     WINDOWS NT        |
   ----------------------------------------------------------------------
   | File attributes | archive, hidden,         | archive               |
   |                 | read-only, system        |                       |
   ----------------------------------------------------------------------
   | Location of     | Created in the windows   | Created in the        |
   | saved registry  | directory for both local | current directory     |
   | file if no path | and remote keys.         | of the process for a  |
   | is specified.   |                          | local key, and in the |
   |                 |                          | %systemroot%\system32 |
   |                 |                          | for a remote key.     |
   ----------------------------------------------------------------------
   | Error returned  | error code 1016,         | error code 183,       |
   | if file already | ERROR_REGISTRY_IO_FAILED | ERROR_ALREADY_EXISTS  |
   | exists.         |                          |                       |
   ----------------------------------------------------------------------

KBCategory: kbprg kbhowto KBSubcategory: BseRegistry Additional reference words: 3.51 4.00 Win95 kbdss
Keywords          : kbKernBase kbRegistry kbGrpKernBase 
Version           : 4.00    | 3.51 4.00
Platform          : NT WINDOWS

Last Reviewed: January 17, 1997