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.

73 lines
2.1 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 1993-1994
  4. *
  5. * TITLE: REGPORTE.H
  6. *
  7. * VERSION: 4.01
  8. *
  9. * AUTHOR: Tracy Sharpe
  10. *
  11. * DATE: 06 Apr 1994
  12. *
  13. * File import and export engine routines for the Registry Editor.
  14. *
  15. *******************************************************************************/
  16. #ifndef _INC_REGPORTE
  17. #define _INC_REGPORTE
  18. #ifndef LPHKEY
  19. #define LPHKEY HKEY FAR*
  20. #endif
  21. // PREDEFINED KEYS
  22. typedef enum _PREDEFINE_KEY {
  23. PREDEFINE_KEY_CLASSES_ROOT,
  24. PREDEFINE_KEY_CURRENT_USER,
  25. PREDEFINE_KEY_LOCAL_MACHINE,
  26. PREDEFINE_KEY_USERS,
  27. PREDEFINE_KEY_CURRENT_CONFIG
  28. } PREDEFINE_KEY;
  29. typedef struct _REGISTRY_ROOT {
  30. LPTSTR lpKeyName;
  31. HKEY hKey;
  32. PREDEFINE_KEY hPreDefKey;
  33. } REGISTRY_ROOT;
  34. #define INDEX_HKEY_CLASSES_ROOT 0
  35. #define INDEX_HKEY_CURRENT_USER 1
  36. #define INDEX_HKEY_LOCAL_MACHINE 2
  37. #define INDEX_HKEY_USERS 3
  38. // #define INDEX_HKEY_PERFORMANCE_DATA 4
  39. #define INDEX_HKEY_CURRENT_CONFIG 4
  40. #define INDEX_HKEY_DYN_DATA 5
  41. // #define NUMBER_REGISTRY_ROOTS 7
  42. #define NUMBER_REGISTRY_ROOTS 6
  43. // WARNING: This is supposed to be enough for one keyname plus one predefined
  44. // handle name.
  45. #define SIZE_SELECTED_PATH (MAXKEYNAME + 40)
  46. extern const TCHAR g_HexConversion[];
  47. extern UINT g_FileErrorStringID;
  48. #define ERK_OPEN 0
  49. #define ERK_CREATE 1
  50. #define ERK_DELETE 2
  51. HKEY Regedit_GetRootKeyFromComputer(HTREEITEM hComputerItem, PTSTR pszFullKeyName);
  52. DWORD EditRegistryKey(HTREEITEM hComputerItem, LPHKEY lphKey, LPTSTR lpFullKeyName, UINT uOperation);
  53. VOID ImportRegFile(HWND hWnd, LPTSTR lpFileName, HTREEITEM hComputerItem);
  54. VOID ExportWinNT50RegFile(LPTSTR lpFileName, LPTSTR lpSelectedPath);
  55. void ExportRegedt32File(LPTSTR lpFileName, LPTSTR lpSelectedPath);
  56. VOID ExportWin40RegFile(LPTSTR lpFileName, LPTSTR lpSelectedPath);
  57. VOID ImportRegFileUICallback(UINT uPercentage);
  58. void RestoreBinaryKeyFile(HWND hWnd, LPTSTR lpFileName);
  59. #endif // _INC_REGPORTE