Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.5 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // RegUtils.h
  4. //
  5. // Helper functions for dealing with the registry.
  6. //
  7. // Author: Jeff Steinbok
  8. //
  9. // 02/01/01 jeffstei Initial Version
  10. //
  11. // Copyright <cp> 2000-2001 Microsoft Corporation. All Rights Reserved.
  12. //
  13. //-----------------------------------------------------------------------------
  14. #ifndef _REG_UTILS_H
  15. #define _REG_UTILS_H
  16. //
  17. // CopyKeyHierarchy(...)
  18. //
  19. // Copies a hierarchy of the registry to another location
  20. //
  21. // Params:
  22. // HKEY in_hKeySrc Handler to the parent key, this can be
  23. // simpley HKEY_CLASSES_ROOT
  24. // LPTSTR in_lpszSubKeySrc Subkey string. This can be NULL if the prev
  25. // param points to the actual key.
  26. // HKEY in_hKeyDest Destination key.
  27. // LPTSTR in_lpszSubKeyDest Destination subkey.
  28. //
  29. // Returns:
  30. // 0 = Success
  31. // !0 = Failure: See error codes in winerror.h
  32. //
  33. // Examples:
  34. // CopyKeyHierarchy(HKEY_CLASSES_ROOT, L"Passport.Manager", HKEY_CLASSES_ROOT, L"PPMCopy")
  35. // CopyKeyHierarchy(key, NULL, HKEY_CLASSES_ROOT, L"PPMCopy")
  36. //
  37. LONG CopyKeyHierarchy (HKEY in_hKeySrc, LPTSTR in_lpszSubKeySrc, HKEY in_hKeyDest, LPTSTR in_lpszSubKeyDest);
  38. //
  39. // DeleteKeyHierarchy(...)
  40. //
  41. // Deletes a hierarchy of the registry
  42. //
  43. // Params:
  44. // HKEY in_hKey Handler to the parent key, this can be
  45. // simpley HKEY_CLASSES_ROOT
  46. // LPTSTR in_lpszSubKey Subkey string. This can be NULL if the prev
  47. // param points to the actual key.
  48. //
  49. // Returns:
  50. // 0 = Success
  51. // !0 = Failure: See error codes in winerror.h
  52. //
  53. // Examples:
  54. // DeleteKeyHierarchy(HKEY_CLASSES_ROOT, L"Passport.Manager")
  55. // DeleteKeyHierarchy(key, NULL)
  56. //
  57. LONG DeleteKeyHierarchy (HKEY in_hKey, LPTSTR in_lpszSubKey);
  58. //
  59. // RenameKey(...)
  60. //
  61. // Renames a registry key
  62. //
  63. // Params:
  64. // HKEY in_hKeySrc Handler to the parent key, this can be
  65. // simpley HKEY_CLASSES_ROOT
  66. // LPTSTR in_lpszSubKeySrc Subkey string. This can be NULL if the prev
  67. // param points to the actual key.
  68. // HKEY in_hKeyDest Destination key.
  69. // LPTSTR in_lpszSubKeyDest Destination subkey.
  70. //
  71. // Returns:
  72. // 0 = Success
  73. // !0 = Failure: See error codes in winerror.h
  74. //
  75. // Examples:
  76. // RenameKey(HKEY_CLASSES_ROOT, L"Passport.Manager", HKEY_CLASSES_ROOT, L"PPMCopy")
  77. // RenameKey(key, NULL, HKEY_CLASSES_ROOT, L"PPMCopy")
  78. //
  79. LONG RenameKey (HKEY in_hKeySrc, LPTSTR in_lpszSubKeySrc, HKEY in_hKeyDest, LPTSTR in_lpszSubKeyDest);
  80. #endif _REG_UTILS_H